<!DOCTYPE html>
<html lang="zh-Hans">
<head>

    <!--[if lt IE 9]>
        <style>body {display: none; background: none !important} </style>
        <meta http-equiv="Refresh" Content="0; url=//outdatedbrowser.com/" />
    <![endif]-->

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="format-detection" content="telephone=no" />
<meta name="author" content="Bingo" />



<meta name="description" content="五个下午的时间！！！！终于过了！！有史以来做的最复杂的一个题">
<meta property="og:type" content="article">
<meta property="og:title" content="coursera_魔兽世界终结版">
<meta property="og:url" content="http://blog.acbingo.cn/2016/03/11/coursera_魔兽世界终结版/index.html">
<meta property="og:site_name" content="Bingo's Blog">
<meta property="og:description" content="五个下午的时间！！！！终于过了！！有史以来做的最复杂的一个题">
<meta property="og:updated_time" content="2016-03-11T09:20:58.533Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="coursera_魔兽世界终结版">
<meta name="twitter:description" content="五个下午的时间！！！！终于过了！！有史以来做的最复杂的一个题">

<link rel="apple-touch-icon" href= "/apple-touch-icon.png">


    <link rel="alternate" href="/atom.xml" title="Bingo&#39;s Blog" type="application/atom+xml">



    <link rel="shortcut icon" href="/favicon.png">





    <link href="//cdn.bootcss.com/fancybox/2.1.5/jquery.fancybox.min.css" rel="stylesheet">



    <script src="//cdn.bootcss.com/pace/1.0.2/pace.min.js"></script>
    <link href="//cdn.bootcss.com/pace/1.0.2/themes/blue/pace-theme-minimal.css" rel="stylesheet">


<link rel="stylesheet" href="/css/style.css">



<link href="//cdn.bootcss.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">


<title>coursera_魔兽世界终结版 | Bingo&#39;s Blog</title>

<script src="//cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
<script src="//cdn.bootcss.com/clipboard.js/1.5.10/clipboard.min.js"></script>

<script>
    var yiliaConfig = {
        fancybox: true,
        animate: false,
        isHome: false,
        isPost: true,
        isArchive: false,
        isTag: false,
        isCategory: false,
        fancybox_js: "//cdn.bootcss.com/fancybox/2.1.5/jquery.fancybox.min.js",
        scrollreveal: "//cdn.bootcss.com/scrollReveal.js/3.1.4/scrollreveal.min.js",
        search: true
    }
</script>


    <script> yiliaConfig.jquery_ui = [false]; </script>



    <script> yiliaConfig.rootUrl = "\/";</script>






</head>
<body>
  <div id="container">
    <div class="left-col">
    <div class="overlay"></div>
<div class="intrude-less">
    <header id="header" class="inner">
        <a href="/" class="profilepic">
            <img src="/img/avatar.png" class="animated zoomIn">
        </a>
        <hgroup>
          <h1 class="header-author"><a href="/">Bingo</a></h1>
        </hgroup>

        
        <p class="header-subtitle">Here&#39;s My Second Brains</p>
        

        
            <form id="search-form">
            <input type="text" id="local-search-input" name="q" placeholder="search..." class="search form-control" autocomplete="off" autocorrect="off" searchonload="false" />
            <i class="fa fa-times" onclick="resetSearch()"></i>
            </form>
            <div id="local-search-result"></div>
            <p class='no-result'>No results found <i class='fa fa-spinner fa-pulse'></i></p>
        


        
            <div id="switch-btn" class="switch-btn">
                <div class="icon">
                    <div class="icon-ctn">
                        <div class="icon-wrap icon-house" data-idx="0">
                            <div class="birdhouse"></div>
                            <div class="birdhouse_holes"></div>
                        </div>
                        <div class="icon-wrap icon-ribbon hide" data-idx="1">
                            <div class="ribbon"></div>
                        </div>
                        
                        <div class="icon-wrap icon-link hide" data-idx="2">
                            <div class="loopback_l"></div>
                            <div class="loopback_r"></div>
                        </div>
                        
                        
                        <div class="icon-wrap icon-me hide" data-idx="3">
                            <div class="user"></div>
                            <div class="shoulder"></div>
                        </div>
                        
                    </div>
                    
                </div>
                <div class="tips-box hide">
                    <div class="tips-arrow"></div>
                    <ul class="tips-inner">
                        <li>菜单</li>
                        <li>标签</li>
                        
                        <li>友情链接</li>
                        
                        
                        <li>关于我</li>
                        
                    </ul>
                </div>
            </div>
        

        <div id="switch-area" class="switch-area">
            <div class="switch-wrap">
                <section class="switch-part switch-part1">
                    <nav class="header-menu">
                        <ul>
                        
                            <li><a href="/">主页</a></li>
                        
                            <li><a href="/archives/">所有文章</a></li>
                        
                            <li><a href="/tags/">标签云</a></li>
                        
                            <li><a href="http://acbingo.cn/">关于我</a></li>
                        
                        </ul>
                    </nav>
                    <nav class="header-nav">
                        <ul class="social">
                            
                                <a class="fa Email" href="/&#116;&#x66;&#117;&#116;&#121;&#x40;&#x71;&#113;&#46;&#99;&#111;&#109;" title="Email"></a>
                            
                                <a class="fa GitHub" href="https://github.com/ACBingo" title="GitHub"></a>
                            
                                <a class="fa 知乎" href="https://www.zhihu.com/people/li-bing-59-10" title="知乎"></a>
                            
                                <a class="fa StackOverflow" href="http://stackoverflow.com/users/6059386/acbingo" title="StackOverflow"></a>
                            
                        </ul>
                    </nav>
                </section>
                
                
                <section class="switch-part switch-part2">
                    <div class="widget tagcloud" id="js-tagcloud">
                        <ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/tags/Android/">Android</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Array/">Array</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Hash-Table/">Hash Table</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/KMP/">KMP</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/LeetCode/">LeetCode</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Linked-List/">Linked List</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Math/">Math</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/STL/">STL</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/String/">String</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/android/">android</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/anroid/">anroid</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/books/">books</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/c/">c#</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/c/">c++</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/cocos/">cocos</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/cocos2dx/">cocos2dx</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/const/">const</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/coursera/">coursera</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/git/">git</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/github/">github</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/hash/">hash</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/hdu/">hdu</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/hexo/">hexo</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/linux/">linux</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/markdown/">markdown</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/offer/">offer</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/other/">other</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/poj/">poj</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/shadowsocks/">shadowsocks</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/string/">string</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/ubuntu/">ubuntu</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/uva/">uva</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/vim/">vim</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/二分/">二分</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/二叉树/">二叉树</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/位运算/">位运算</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/其它/">其它</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/分治/">分治</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/动态规划/">动态规划</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/单调队列/">单调队列</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/回溯/">回溯</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/字符串/">字符串</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/字符串匹配/">字符串匹配</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/指针/">指针</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/排序/">排序</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/操作系统/">操作系统</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/数据结构/">数据结构</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/枚举/">枚举</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/树/">树</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/算法/">算法</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/红黑树/">红黑树</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/线段树/">线段树</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/继承/">继承</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/编译原理/">编译原理</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/虚函数/">虚函数</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/逆序对/">逆序对</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/递归/">递归</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/链表/">链表</a></li></ul>
                    </div>
                </section>
                
                
                
                <section class="switch-part switch-part3">
                    <div id="js-friends">
                    
                      <a class="main-nav-link switch-friends-link" href="https://hexo.io">Hexo</a>
                    
                      <a class="main-nav-link switch-friends-link" href="https://pages.github.com/">GitHub</a>
                    
                      <a class="main-nav-link switch-friends-link" href="http://moxfive.xyz/">MOxFIVE</a>
                    
                    </div>
                </section>
                

                
                
                <section class="switch-part switch-part4">
                
                    <div id="js-aboutme">专注于前端</div>
                </section>
                
            </div>
        </div>
    </header>                
</div>
    </div>
    <div class="mid-col">
      <nav id="mobile-nav">
      <div class="overlay">
          <div class="slider-trigger"></div>
          <h1 class="header-author js-mobile-header hide"><a href="/" title="回到主页">Bingo</a></h1>
      </div>
    <div class="intrude-less">
        <header id="header" class="inner">
            <a href="/" class="profilepic">
                <img src="/img/avatar.png" class="animated zoomIn">
            </a>
            <hgroup>
              <h1 class="header-author"><a href="/" title="回到主页">Bingo</a></h1>
            </hgroup>
            
            <p class="header-subtitle">Here&#39;s My Second Brains</p>
            
            <nav class="header-menu">
                <ul>
                
                    <li><a href="/">主页</a></li>
                
                    <li><a href="/archives/">所有文章</a></li>
                
                    <li><a href="/tags/">标签云</a></li>
                
                    <li><a href="http://acbingo.cn/">关于我</a></li>
                
                <div class="clearfix"></div>
                </ul>
            </nav>
            <nav class="header-nav">
                        <ul class="social">
                            
                                <a class="fa Email" target="_blank" href="/&#116;&#x66;&#117;&#116;&#121;&#x40;&#x71;&#113;&#46;&#99;&#111;&#109;" title="Email"></a>
                            
                                <a class="fa GitHub" target="_blank" href="https://github.com/ACBingo" title="GitHub"></a>
                            
                                <a class="fa 知乎" target="_blank" href="https://www.zhihu.com/people/li-bing-59-10" title="知乎"></a>
                            
                                <a class="fa StackOverflow" target="_blank" href="http://stackoverflow.com/users/6059386/acbingo" title="StackOverflow"></a>
                            
                        </ul>
            </nav>
        </header>                
    </div>
    <link class="menu-list" tags="标签" friends="友情链接" about="关于我"/>
</nav>
      <div class="body-wrap"><article id="post-coursera_魔兽世界终结版" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/2016/03/11/coursera_魔兽世界终结版/" class="article-date">
      <time datetime="2016-03-11T08:55:34.000Z" itemprop="datePublished">2016-03-11</time>
</a>


    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      coursera_魔兽世界终结版
    </h1>
  

      </header>
      
      <div class="article-info article-info-post">
        

        
    <div class="article-tag tagcloud">
        <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/coursera/">coursera</a></li></ul>
    </div>

        <div class="clearfix"></div>
      </div>
      
    
    <div class="article-entry" itemprop="articleBody">
      
          
        <p>五个下午的时间！！！！终于过了！！<br>有史以来做的最复杂的一个题<br><a id="more"></a><br>这是我迄今为止做的最复杂也最具有挑战的一个oj作业。虽然之前做过比这个规模一些作业项目，但是往往有简单的模块框架，模块之前的关系也只是有些简单的联系，代码量虽然多，但是并不复杂。然而，然而这个题不仅有着复杂的逻辑关系，而且是oj测试啊！！意味着你需要实现所有特性，而且不能有一丁点的错误！<br>从决定开始做这个题，到最后两个平台AC，前前后后大概花了5个下午的时间。<br>在读完题后（相信我，为了搞懂每一个细节，题目我读了整整一个小时），coding前，大概花了两个到三个小时，画图、构思程序应该有着什么样的结构，都应该有哪些类，类之前的关系是什么样的，类中应该有哪些元素。。。。等等<br>不过即使想了这么长时间，coding途中也遇到不少问题导致最后的代码封装性差、结构也不是那么美好。。<br>coding时很多地方抽象得并不合理，为了少量修改目前已经完成的代码（不想去动大结构）而作出妥协。结果越到后面越发现整个程序非常混乱，各个类耦合度过高，程序的健壮性十分差。常常是为了一个新功能的实现，要引起三四五六处修改，一不注意就会留下bug。最终调试bug的时候，对于前期没构思好结构的后加的代码修改起来相当麻烦。<br>虽然我一直在注重代码的重用性，但是到最后我还是感觉代码的重用性不高，程序的结构还能优化的更好<br>做完了这个作业，让我感觉我就好像是重新学习了c艹，c艹的继承和多态、虚函数等一些特性，从认识到了解终于可以做到了熟悉掌握。<br>我要是有精力，一定要重构一下= =。。。<br>从一开始就认认真真的画类图，把游戏角色类（建筑、武士、武器）和游戏逻辑类、单元测试类的各自特征和功能梳理得更有条理，把整条游戏流程通过写伪代码的方式弄个清晰明了后再开始coding。。<br>总之，编码前的准备是否足够充分决定了你编码时和debug时的痛苦程度啊</p>
<h1 id="错误"><a href="#错误" class="headerlink" title="错误"></a>错误</h1><p>我认为魔兽世界终结版这题有错误！！</p>
<p>一开始我在poj上提交通过了，然后再从coursera上提交居然WA</p>
<p>我结合讨论区<a href="https://www.coursera.org/learn/cpp-chengxu-sheji/programming/lu7ei/bian-cheng-zuo-ye-duo-tai-yu-xu-han-shu/discussions/8nJlFlpDEeWVrg78i3ja5Q" target="_blank" rel="external">花雨</a>同学的留言再测试了下数据。</p>
<p>poj上提供的27组测试数据中，在case 16：</p>
<p>006:00 blue dragon 7 born</p>
<p>Its morale is 11.62</p>
<p>我的输出数据（编译器vs2015）是：</p>
<p>006:00 blue dragon 7 born</p>
<p>Its morale is 11.63</p>
<p>经调试，我发现真正的正确答案应该就是11.63。</p>
<p>有人反映是编译器的问题，我测试了gcc的输出结果，同样是11.63</p>
<p>注意！即使我的输出结果和poj提供的out.txt文件不同，我的代码仍然是Accept！只是在coursera上WA。</p>
<p>然后，我修改了我的代码，不再进行四舍五入了，改为直接截尾保留两位小数。</p>
<p>这时，我的输出与out.txt相同了，在poj提交仍然Accept！</p>
<p>在coursera上提交也通过了！！</p>
<p>所以，我认为，有两个问题：</p>
<p>1.poj的评测有问题（不然我两次不同的代码输出不同的结果都能AC啊）</p>
<p>2.两个平台的测试数据都有问题（按照题目描述的四舍五入应该是11.63才对）</p>
<p>希望助教和老师能再审查一下题目啊，毕竟愿意做这个题的人不多，花出很大心血做完后却一直不能通过得多痛心啊！</p>
<h1 id="AC代码"><a href="#AC代码" class="headerlink" title="AC代码"></a>AC代码</h1><p>本代码在vs上能编译，若想提交到oj上，需要改动一些地方<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div><div class="line">39</div><div class="line">40</div><div class="line">41</div><div class="line">42</div><div class="line">43</div><div class="line">44</div><div class="line">45</div><div class="line">46</div><div class="line">47</div><div class="line">48</div><div class="line">49</div><div class="line">50</div><div class="line">51</div><div class="line">52</div><div class="line">53</div><div class="line">54</div><div class="line">55</div><div class="line">56</div><div class="line">57</div><div class="line">58</div><div class="line">59</div><div class="line">60</div><div class="line">61</div><div class="line">62</div><div class="line">63</div><div class="line">64</div><div class="line">65</div><div class="line">66</div><div class="line">67</div><div class="line">68</div><div class="line">69</div><div class="line">70</div><div class="line">71</div><div class="line">72</div><div class="line">73</div><div class="line">74</div><div class="line">75</div><div class="line">76</div><div class="line">77</div><div class="line">78</div><div class="line">79</div><div class="line">80</div><div class="line">81</div><div class="line">82</div><div class="line">83</div><div class="line">84</div><div class="line">85</div><div class="line">86</div><div class="line">87</div><div class="line">88</div><div class="line">89</div><div class="line">90</div><div class="line">91</div><div class="line">92</div><div class="line">93</div><div class="line">94</div><div class="line">95</div><div class="line">96</div><div class="line">97</div><div class="line">98</div><div class="line">99</div><div class="line">100</div><div class="line">101</div><div class="line">102</div><div class="line">103</div><div class="line">104</div><div class="line">105</div><div class="line">106</div><div class="line">107</div><div class="line">108</div><div class="line">109</div><div class="line">110</div><div class="line">111</div><div class="line">112</div><div class="line">113</div><div class="line">114</div><div class="line">115</div><div class="line">116</div><div class="line">117</div><div class="line">118</div><div class="line">119</div><div class="line">120</div><div class="line">121</div><div class="line">122</div><div class="line">123</div><div class="line">124</div><div class="line">125</div><div class="line">126</div><div class="line">127</div><div class="line">128</div><div class="line">129</div><div class="line">130</div><div class="line">131</div><div class="line">132</div><div class="line">133</div><div class="line">134</div><div class="line">135</div><div class="line">136</div><div class="line">137</div><div class="line">138</div><div class="line">139</div><div class="line">140</div><div class="line">141</div><div class="line">142</div><div class="line">143</div><div class="line">144</div><div class="line">145</div><div class="line">146</div><div class="line">147</div><div class="line">148</div><div class="line">149</div><div class="line">150</div><div class="line">151</div><div class="line">152</div><div class="line">153</div><div class="line">154</div><div class="line">155</div><div class="line">156</div><div class="line">157</div><div class="line">158</div><div class="line">159</div><div class="line">160</div><div class="line">161</div><div class="line">162</div><div class="line">163</div><div class="line">164</div><div class="line">165</div><div class="line">166</div><div class="line">167</div><div class="line">168</div><div class="line">169</div><div class="line">170</div><div class="line">171</div><div class="line">172</div><div class="line">173</div><div class="line">174</div><div class="line">175</div><div class="line">176</div><div class="line">177</div><div class="line">178</div><div class="line">179</div><div class="line">180</div><div class="line">181</div><div class="line">182</div><div class="line">183</div><div class="line">184</div><div class="line">185</div><div class="line">186</div><div class="line">187</div><div class="line">188</div><div class="line">189</div><div class="line">190</div><div class="line">191</div><div class="line">192</div><div class="line">193</div><div class="line">194</div><div class="line">195</div><div class="line">196</div><div class="line">197</div><div class="line">198</div><div class="line">199</div><div class="line">200</div><div class="line">201</div><div class="line">202</div><div class="line">203</div><div class="line">204</div><div class="line">205</div><div class="line">206</div><div class="line">207</div><div class="line">208</div><div class="line">209</div><div class="line">210</div><div class="line">211</div><div class="line">212</div><div class="line">213</div><div class="line">214</div><div class="line">215</div><div class="line">216</div><div class="line">217</div><div class="line">218</div><div class="line">219</div><div class="line">220</div><div class="line">221</div><div class="line">222</div><div class="line">223</div><div class="line">224</div><div class="line">225</div><div class="line">226</div><div class="line">227</div><div class="line">228</div><div class="line">229</div><div class="line">230</div><div class="line">231</div><div class="line">232</div><div class="line">233</div><div class="line">234</div><div class="line">235</div><div class="line">236</div><div class="line">237</div><div class="line">238</div><div class="line">239</div><div class="line">240</div><div class="line">241</div><div class="line">242</div><div class="line">243</div><div class="line">244</div><div class="line">245</div><div class="line">246</div><div class="line">247</div><div class="line">248</div><div class="line">249</div><div class="line">250</div><div class="line">251</div><div class="line">252</div><div class="line">253</div><div class="line">254</div><div class="line">255</div><div class="line">256</div><div class="line">257</div><div class="line">258</div><div class="line">259</div><div class="line">260</div><div class="line">261</div><div class="line">262</div><div class="line">263</div><div class="line">264</div><div class="line">265</div><div class="line">266</div><div class="line">267</div><div class="line">268</div><div class="line">269</div><div class="line">270</div><div class="line">271</div><div class="line">272</div><div class="line">273</div><div class="line">274</div><div class="line">275</div><div class="line">276</div><div class="line">277</div><div class="line">278</div><div class="line">279</div><div class="line">280</div><div class="line">281</div><div class="line">282</div><div class="line">283</div><div class="line">284</div><div class="line">285</div><div class="line">286</div><div class="line">287</div><div class="line">288</div><div class="line">289</div><div class="line">290</div><div class="line">291</div><div class="line">292</div><div class="line">293</div><div class="line">294</div><div class="line">295</div><div class="line">296</div><div class="line">297</div><div class="line">298</div><div class="line">299</div><div class="line">300</div><div class="line">301</div><div class="line">302</div><div class="line">303</div><div class="line">304</div><div class="line">305</div><div class="line">306</div><div class="line">307</div><div class="line">308</div><div class="line">309</div><div class="line">310</div><div class="line">311</div><div class="line">312</div><div class="line">313</div><div class="line">314</div><div class="line">315</div><div class="line">316</div><div class="line">317</div><div class="line">318</div><div class="line">319</div><div class="line">320</div><div class="line">321</div><div class="line">322</div><div class="line">323</div><div class="line">324</div><div class="line">325</div><div class="line">326</div><div class="line">327</div><div class="line">328</div><div class="line">329</div><div class="line">330</div><div class="line">331</div><div class="line">332</div><div class="line">333</div><div class="line">334</div><div class="line">335</div><div class="line">336</div><div class="line">337</div><div class="line">338</div><div class="line">339</div><div class="line">340</div><div class="line">341</div><div class="line">342</div><div class="line">343</div><div class="line">344</div><div class="line">345</div><div class="line">346</div><div class="line">347</div><div class="line">348</div><div class="line">349</div><div class="line">350</div><div class="line">351</div><div class="line">352</div><div class="line">353</div><div class="line">354</div><div class="line">355</div><div class="line">356</div><div class="line">357</div><div class="line">358</div><div class="line">359</div><div class="line">360</div><div class="line">361</div><div class="line">362</div><div class="line">363</div><div class="line">364</div><div class="line">365</div><div class="line">366</div><div class="line">367</div><div class="line">368</div><div class="line">369</div><div class="line">370</div><div class="line">371</div><div class="line">372</div><div class="line">373</div><div class="line">374</div><div class="line">375</div><div class="line">376</div><div class="line">377</div><div class="line">378</div><div class="line">379</div><div class="line">380</div><div class="line">381</div><div class="line">382</div><div class="line">383</div><div class="line">384</div><div class="line">385</div><div class="line">386</div><div class="line">387</div><div class="line">388</div><div class="line">389</div><div class="line">390</div><div class="line">391</div><div class="line">392</div><div class="line">393</div><div class="line">394</div><div class="line">395</div><div class="line">396</div><div class="line">397</div><div class="line">398</div><div class="line">399</div><div class="line">400</div><div class="line">401</div><div class="line">402</div><div class="line">403</div><div class="line">404</div><div class="line">405</div><div class="line">406</div><div class="line">407</div><div class="line">408</div><div class="line">409</div><div class="line">410</div><div class="line">411</div><div class="line">412</div><div class="line">413</div><div class="line">414</div><div class="line">415</div><div class="line">416</div><div class="line">417</div><div class="line">418</div><div class="line">419</div><div class="line">420</div><div class="line">421</div><div class="line">422</div><div class="line">423</div><div class="line">424</div><div class="line">425</div><div class="line">426</div><div class="line">427</div><div class="line">428</div><div class="line">429</div><div class="line">430</div><div class="line">431</div><div class="line">432</div><div class="line">433</div><div class="line">434</div><div class="line">435</div><div class="line">436</div><div class="line">437</div><div class="line">438</div><div class="line">439</div><div class="line">440</div><div class="line">441</div><div class="line">442</div><div class="line">443</div><div class="line">444</div><div class="line">445</div><div class="line">446</div><div class="line">447</div><div class="line">448</div><div class="line">449</div><div class="line">450</div><div class="line">451</div><div class="line">452</div><div class="line">453</div><div class="line">454</div><div class="line">455</div><div class="line">456</div><div class="line">457</div><div class="line">458</div><div class="line">459</div><div class="line">460</div><div class="line">461</div><div class="line">462</div><div class="line">463</div><div class="line">464</div><div class="line">465</div><div class="line">466</div><div class="line">467</div><div class="line">468</div><div class="line">469</div><div class="line">470</div><div class="line">471</div><div class="line">472</div><div class="line">473</div><div class="line">474</div><div class="line">475</div><div class="line">476</div><div class="line">477</div><div class="line">478</div><div class="line">479</div><div class="line">480</div><div class="line">481</div><div class="line">482</div><div class="line">483</div><div class="line">484</div><div class="line">485</div><div class="line">486</div><div class="line">487</div><div class="line">488</div><div class="line">489</div><div class="line">490</div><div class="line">491</div><div class="line">492</div><div class="line">493</div><div class="line">494</div><div class="line">495</div><div class="line">496</div><div class="line">497</div><div class="line">498</div><div class="line">499</div><div class="line">500</div><div class="line">501</div><div class="line">502</div><div class="line">503</div><div class="line">504</div><div class="line">505</div><div class="line">506</div><div class="line">507</div><div class="line">508</div><div class="line">509</div><div class="line">510</div><div class="line">511</div><div class="line">512</div><div class="line">513</div><div class="line">514</div><div class="line">515</div><div class="line">516</div><div class="line">517</div><div class="line">518</div><div class="line">519</div><div class="line">520</div><div class="line">521</div><div class="line">522</div><div class="line">523</div><div class="line">524</div><div class="line">525</div><div class="line">526</div><div class="line">527</div><div class="line">528</div><div class="line">529</div><div class="line">530</div><div class="line">531</div><div class="line">532</div><div class="line">533</div><div class="line">534</div><div class="line">535</div><div class="line">536</div><div class="line">537</div><div class="line">538</div><div class="line">539</div><div class="line">540</div><div class="line">541</div><div class="line">542</div><div class="line">543</div><div class="line">544</div><div class="line">545</div><div class="line">546</div><div class="line">547</div><div class="line">548</div><div class="line">549</div><div class="line">550</div><div class="line">551</div><div class="line">552</div><div class="line">553</div><div class="line">554</div><div class="line">555</div><div class="line">556</div><div class="line">557</div><div class="line">558</div><div class="line">559</div><div class="line">560</div><div class="line">561</div><div class="line">562</div><div class="line">563</div><div class="line">564</div><div class="line">565</div><div class="line">566</div><div class="line">567</div><div class="line">568</div><div class="line">569</div><div class="line">570</div><div class="line">571</div><div class="line">572</div><div class="line">573</div><div class="line">574</div><div class="line">575</div><div class="line">576</div><div class="line">577</div><div class="line">578</div><div class="line">579</div><div class="line">580</div><div class="line">581</div><div class="line">582</div><div class="line">583</div><div class="line">584</div><div class="line">585</div><div class="line">586</div><div class="line">587</div><div class="line">588</div><div class="line">589</div><div class="line">590</div><div class="line">591</div><div class="line">592</div><div class="line">593</div><div class="line">594</div><div class="line">595</div><div class="line">596</div><div class="line">597</div><div class="line">598</div><div class="line">599</div><div class="line">600</div><div class="line">601</div><div class="line">602</div><div class="line">603</div><div class="line">604</div><div class="line">605</div><div class="line">606</div><div class="line">607</div><div class="line">608</div><div class="line">609</div><div class="line">610</div><div class="line">611</div><div class="line">612</div><div class="line">613</div><div class="line">614</div><div class="line">615</div><div class="line">616</div><div class="line">617</div><div class="line">618</div><div class="line">619</div><div class="line">620</div><div class="line">621</div><div class="line">622</div><div class="line">623</div><div class="line">624</div><div class="line">625</div><div class="line">626</div><div class="line">627</div><div class="line">628</div><div class="line">629</div><div class="line">630</div><div class="line">631</div><div class="line">632</div><div class="line">633</div><div class="line">634</div><div class="line">635</div><div class="line">636</div><div class="line">637</div><div class="line">638</div><div class="line">639</div><div class="line">640</div><div class="line">641</div><div class="line">642</div><div class="line">643</div><div class="line">644</div><div class="line">645</div><div class="line">646</div><div class="line">647</div><div class="line">648</div><div class="line">649</div><div class="line">650</div><div class="line">651</div><div class="line">652</div><div class="line">653</div><div class="line">654</div><div class="line">655</div><div class="line">656</div><div class="line">657</div><div class="line">658</div><div class="line">659</div><div class="line">660</div><div class="line">661</div><div class="line">662</div><div class="line">663</div><div class="line">664</div><div class="line">665</div><div class="line">666</div><div class="line">667</div><div class="line">668</div><div class="line">669</div><div class="line">670</div><div class="line">671</div><div class="line">672</div><div class="line">673</div><div class="line">674</div><div class="line">675</div><div class="line">676</div><div class="line">677</div><div class="line">678</div><div class="line">679</div><div class="line">680</div><div class="line">681</div><div class="line">682</div><div class="line">683</div><div class="line">684</div><div class="line">685</div><div class="line">686</div><div class="line">687</div><div class="line">688</div><div class="line">689</div><div class="line">690</div><div class="line">691</div><div class="line">692</div><div class="line">693</div><div class="line">694</div><div class="line">695</div><div class="line">696</div><div class="line">697</div><div class="line">698</div><div class="line">699</div><div class="line">700</div><div class="line">701</div><div class="line">702</div><div class="line">703</div><div class="line">704</div><div class="line">705</div><div class="line">706</div><div class="line">707</div><div class="line">708</div><div class="line">709</div><div class="line">710</div><div class="line">711</div><div class="line">712</div><div class="line">713</div><div class="line">714</div><div class="line">715</div><div class="line">716</div><div class="line">717</div><div class="line">718</div><div class="line">719</div><div class="line">720</div><div class="line">721</div><div class="line">722</div><div class="line">723</div><div class="line">724</div><div class="line">725</div><div class="line">726</div><div class="line">727</div><div class="line">728</div><div class="line">729</div><div class="line">730</div><div class="line">731</div><div class="line">732</div><div class="line">733</div><div class="line">734</div><div class="line">735</div><div class="line">736</div><div class="line">737</div><div class="line">738</div><div class="line">739</div><div class="line">740</div><div class="line">741</div><div class="line">742</div><div class="line">743</div><div class="line">744</div><div class="line">745</div><div class="line">746</div><div class="line">747</div><div class="line">748</div><div class="line">749</div><div class="line">750</div><div class="line">751</div><div class="line">752</div><div class="line">753</div><div class="line">754</div><div class="line">755</div><div class="line">756</div><div class="line">757</div><div class="line">758</div><div class="line">759</div><div class="line">760</div><div class="line">761</div><div class="line">762</div><div class="line">763</div><div class="line">764</div><div class="line">765</div><div class="line">766</div><div class="line">767</div><div class="line">768</div><div class="line">769</div><div class="line">770</div><div class="line">771</div><div class="line">772</div><div class="line">773</div><div class="line">774</div><div class="line">775</div><div class="line">776</div><div class="line">777</div><div class="line">778</div><div class="line">779</div><div class="line">780</div><div class="line">781</div><div class="line">782</div><div class="line">783</div><div class="line">784</div><div class="line">785</div><div class="line">786</div><div class="line">787</div><div class="line">788</div><div class="line">789</div><div class="line">790</div><div class="line">791</div><div class="line">792</div><div class="line">793</div><div class="line">794</div><div class="line">795</div><div class="line">796</div><div class="line">797</div><div class="line">798</div><div class="line">799</div><div class="line">800</div><div class="line">801</div><div class="line">802</div><div class="line">803</div><div class="line">804</div><div class="line">805</div><div class="line">806</div><div class="line">807</div><div class="line">808</div><div class="line">809</div><div class="line">810</div><div class="line">811</div><div class="line">812</div><div class="line">813</div><div class="line">814</div><div class="line">815</div><div class="line">816</div><div class="line">817</div><div class="line">818</div><div class="line">819</div><div class="line">820</div><div class="line">821</div><div class="line">822</div><div class="line">823</div><div class="line">824</div><div class="line">825</div><div class="line">826</div><div class="line">827</div><div class="line">828</div><div class="line">829</div><div class="line">830</div><div class="line">831</div><div class="line">832</div><div class="line">833</div><div class="line">834</div><div class="line">835</div><div class="line">836</div><div class="line">837</div><div class="line">838</div><div class="line">839</div><div class="line">840</div><div class="line">841</div><div class="line">842</div><div class="line">843</div><div class="line">844</div><div class="line">845</div><div class="line">846</div><div class="line">847</div><div class="line">848</div><div class="line">849</div><div class="line">850</div><div class="line">851</div><div class="line">852</div><div class="line">853</div><div class="line">854</div><div class="line">855</div><div class="line">856</div><div class="line">857</div><div class="line">858</div><div class="line">859</div><div class="line">860</div><div class="line">861</div><div class="line">862</div><div class="line">863</div><div class="line">864</div><div class="line">865</div><div class="line">866</div><div class="line">867</div><div class="line">868</div><div class="line">869</div><div class="line">870</div><div class="line">871</div><div class="line">872</div><div class="line">873</div><div class="line">874</div><div class="line">875</div><div class="line">876</div><div class="line">877</div><div class="line">878</div><div class="line">879</div><div class="line">880</div><div class="line">881</div><div class="line">882</div><div class="line">883</div><div class="line">884</div><div class="line">885</div><div class="line">886</div><div class="line">887</div><div class="line">888</div><div class="line">889</div><div class="line">890</div><div class="line">891</div><div class="line">892</div><div class="line">893</div><div class="line">894</div><div class="line">895</div><div class="line">896</div><div class="line">897</div><div class="line">898</div><div class="line">899</div><div class="line">900</div><div class="line">901</div><div class="line">902</div><div class="line">903</div><div class="line">904</div><div class="line">905</div><div class="line">906</div><div class="line">907</div><div class="line">908</div><div class="line">909</div><div class="line">910</div><div class="line">911</div><div class="line">912</div><div class="line">913</div><div class="line">914</div><div class="line">915</div><div class="line">916</div><div class="line">917</div><div class="line">918</div><div class="line">919</div><div class="line">920</div><div class="line">921</div><div class="line">922</div><div class="line">923</div><div class="line">924</div><div class="line">925</div><div class="line">926</div><div class="line">927</div><div class="line">928</div><div class="line">929</div><div class="line">930</div><div class="line">931</div><div class="line">932</div><div class="line">933</div><div class="line">934</div><div class="line">935</div><div class="line">936</div><div class="line">937</div><div class="line">938</div><div class="line">939</div><div class="line">940</div><div class="line">941</div><div class="line">942</div><div class="line">943</div><div class="line">944</div><div class="line">945</div><div class="line">946</div><div class="line">947</div><div class="line">948</div><div class="line">949</div><div class="line">950</div><div class="line">951</div><div class="line">952</div><div class="line">953</div><div class="line">954</div><div class="line">955</div><div class="line">956</div><div class="line">957</div><div class="line">958</div><div class="line">959</div><div class="line">960</div><div class="line">961</div><div class="line">962</div><div class="line">963</div><div class="line">964</div><div class="line">965</div><div class="line">966</div><div class="line">967</div><div class="line">968</div><div class="line">969</div><div class="line">970</div><div class="line">971</div><div class="line">972</div><div class="line">973</div><div class="line">974</div><div class="line">975</div><div class="line">976</div><div class="line">977</div><div class="line">978</div><div class="line">979</div><div class="line">980</div><div class="line">981</div><div class="line">982</div><div class="line">983</div><div class="line">984</div><div class="line">985</div><div class="line">986</div><div class="line">987</div><div class="line">988</div><div class="line">989</div><div class="line">990</div><div class="line">991</div><div class="line">992</div><div class="line">993</div><div class="line">994</div><div class="line">995</div><div class="line">996</div><div class="line">997</div><div class="line">998</div><div class="line">999</div><div class="line">1000</div><div class="line">1001</div><div class="line">1002</div><div class="line">1003</div><div class="line">1004</div><div class="line">1005</div><div class="line">1006</div><div class="line">1007</div><div class="line">1008</div><div class="line">1009</div><div class="line">1010</div><div class="line">1011</div><div class="line">1012</div><div class="line">1013</div><div class="line">1014</div><div class="line">1015</div><div class="line">1016</div><div class="line">1017</div><div class="line">1018</div><div class="line">1019</div><div class="line">1020</div><div class="line">1021</div><div class="line">1022</div><div class="line">1023</div><div class="line">1024</div><div class="line">1025</div><div class="line">1026</div><div class="line">1027</div><div class="line">1028</div><div class="line">1029</div><div class="line">1030</div><div class="line">1031</div><div class="line">1032</div><div class="line">1033</div><div class="line">1034</div><div class="line">1035</div><div class="line">1036</div><div class="line">1037</div><div class="line">1038</div><div class="line">1039</div><div class="line">1040</div><div class="line">1041</div><div class="line">1042</div><div class="line">1043</div><div class="line">1044</div><div class="line">1045</div><div class="line">1046</div><div class="line">1047</div><div class="line">1048</div><div class="line">1049</div><div class="line">1050</div><div class="line">1051</div><div class="line">1052</div><div class="line">1053</div><div class="line">1054</div><div class="line">1055</div><div class="line">1056</div><div class="line">1057</div><div class="line">1058</div><div class="line">1059</div><div class="line">1060</div><div class="line">1061</div><div class="line">1062</div><div class="line">1063</div><div class="line">1064</div><div class="line">1065</div><div class="line">1066</div><div class="line">1067</div><div class="line">1068</div><div class="line">1069</div><div class="line">1070</div><div class="line">1071</div><div class="line">1072</div><div class="line">1073</div><div class="line">1074</div><div class="line">1075</div><div class="line">1076</div><div class="line">1077</div><div class="line">1078</div><div class="line">1079</div><div class="line">1080</div><div class="line">1081</div><div class="line">1082</div><div class="line">1083</div><div class="line">1084</div><div class="line">1085</div><div class="line">1086</div><div class="line">1087</div><div class="line">1088</div><div class="line">1089</div><div class="line">1090</div><div class="line">1091</div><div class="line">1092</div><div class="line">1093</div><div class="line">1094</div><div class="line">1095</div><div class="line">1096</div><div class="line">1097</div><div class="line">1098</div><div class="line">1099</div><div class="line">1100</div><div class="line">1101</div><div class="line">1102</div><div class="line">1103</div><div class="line">1104</div><div class="line">1105</div><div class="line">1106</div><div class="line">1107</div><div class="line">1108</div><div class="line">1109</div><div class="line">1110</div><div class="line">1111</div><div class="line">1112</div><div class="line">1113</div><div class="line">1114</div><div class="line">1115</div><div class="line">1116</div><div class="line">1117</div><div class="line">1118</div><div class="line">1119</div><div class="line">1120</div><div class="line">1121</div><div class="line">1122</div><div class="line">1123</div><div class="line">1124</div><div class="line">1125</div><div class="line">1126</div><div class="line">1127</div><div class="line">1128</div><div class="line">1129</div><div class="line">1130</div><div class="line">1131</div><div class="line">1132</div><div class="line">1133</div><div class="line">1134</div><div class="line">1135</div><div class="line">1136</div><div class="line">1137</div><div class="line">1138</div><div class="line">1139</div><div class="line">1140</div><div class="line">1141</div><div class="line">1142</div><div class="line">1143</div><div class="line">1144</div><div class="line">1145</div><div class="line">1146</div><div class="line">1147</div><div class="line">1148</div><div class="line">1149</div><div class="line">1150</div><div class="line">1151</div><div class="line">1152</div><div class="line">1153</div><div class="line">1154</div><div class="line">1155</div><div class="line">1156</div><div class="line">1157</div><div class="line">1158</div><div class="line">1159</div><div class="line">1160</div><div class="line">1161</div><div class="line">1162</div><div class="line">1163</div><div class="line">1164</div><div class="line">1165</div><div class="line">1166</div><div class="line">1167</div><div class="line">1168</div><div class="line">1169</div><div class="line">1170</div><div class="line">1171</div><div class="line">1172</div><div class="line">1173</div><div class="line">1174</div><div class="line">1175</div><div class="line">1176</div><div class="line">1177</div><div class="line">1178</div><div class="line">1179</div><div class="line">1180</div><div class="line">1181</div><div class="line">1182</div><div class="line">1183</div><div class="line">1184</div><div class="line">1185</div><div class="line">1186</div><div class="line">1187</div><div class="line">1188</div><div class="line">1189</div><div class="line">1190</div><div class="line">1191</div><div class="line">1192</div><div class="line">1193</div><div class="line">1194</div><div class="line">1195</div><div class="line">1196</div><div class="line">1197</div><div class="line">1198</div><div class="line">1199</div><div class="line">1200</div><div class="line">1201</div><div class="line">1202</div><div class="line">1203</div><div class="line">1204</div><div class="line">1205</div><div class="line">1206</div><div class="line">1207</div><div class="line">1208</div><div class="line">1209</div><div class="line">1210</div><div class="line">1211</div><div class="line">1212</div><div class="line">1213</div><div class="line">1214</div><div class="line">1215</div><div class="line">1216</div><div class="line">1217</div><div class="line">1218</div><div class="line">1219</div><div class="line">1220</div><div class="line">1221</div><div class="line">1222</div><div class="line">1223</div><div class="line">1224</div><div class="line">1225</div><div class="line">1226</div><div class="line">1227</div><div class="line">1228</div><div class="line">1229</div><div class="line">1230</div><div class="line">1231</div><div class="line">1232</div><div class="line">1233</div><div class="line">1234</div><div class="line">1235</div><div class="line">1236</div><div class="line">1237</div><div class="line">1238</div><div class="line">1239</div><div class="line">1240</div><div class="line">1241</div><div class="line">1242</div><div class="line">1243</div><div class="line">1244</div><div class="line">1245</div><div class="line">1246</div><div class="line">1247</div><div class="line">1248</div><div class="line">1249</div><div class="line">1250</div><div class="line">1251</div><div class="line">1252</div><div class="line">1253</div><div class="line">1254</div><div class="line">1255</div><div class="line">1256</div><div class="line">1257</div><div class="line">1258</div><div class="line">1259</div><div class="line">1260</div><div class="line">1261</div><div class="line">1262</div><div class="line">1263</div><div class="line">1264</div><div class="line">1265</div><div class="line">1266</div><div class="line">1267</div><div class="line">1268</div><div class="line">1269</div><div class="line">1270</div><div class="line">1271</div><div class="line">1272</div><div class="line">1273</div><div class="line">1274</div><div class="line">1275</div><div class="line">1276</div><div class="line">1277</div><div class="line">1278</div><div class="line">1279</div><div class="line">1280</div><div class="line">1281</div><div class="line">1282</div><div class="line">1283</div><div class="line">1284</div><div class="line">1285</div><div class="line">1286</div><div class="line">1287</div><div class="line">1288</div><div class="line">1289</div><div class="line">1290</div><div class="line">1291</div><div class="line">1292</div><div class="line">1293</div><div class="line">1294</div><div class="line">1295</div><div class="line">1296</div><div class="line">1297</div><div class="line">1298</div><div class="line">1299</div><div class="line">1300</div><div class="line">1301</div><div class="line">1302</div><div class="line">1303</div><div class="line">1304</div><div class="line">1305</div><div class="line">1306</div><div class="line">1307</div><div class="line">1308</div><div class="line">1309</div><div class="line">1310</div><div class="line">1311</div><div class="line">1312</div><div class="line">1313</div><div class="line">1314</div><div class="line">1315</div><div class="line">1316</div><div class="line">1317</div><div class="line">1318</div><div class="line">1319</div><div class="line">1320</div><div class="line">1321</div><div class="line">1322</div><div class="line">1323</div><div class="line">1324</div><div class="line">1325</div><div class="line">1326</div><div class="line">1327</div><div class="line">1328</div><div class="line">1329</div><div class="line">1330</div><div class="line">1331</div><div class="line">1332</div><div class="line">1333</div><div class="line">1334</div><div class="line">1335</div><div class="line">1336</div><div class="line">1337</div><div class="line">1338</div><div class="line">1339</div><div class="line">1340</div><div class="line">1341</div><div class="line">1342</div><div class="line">1343</div><div class="line">1344</div><div class="line">1345</div><div class="line">1346</div><div class="line">1347</div><div class="line">1348</div><div class="line">1349</div><div class="line">1350</div><div class="line">1351</div><div class="line">1352</div><div class="line">1353</div><div class="line">1354</div><div class="line">1355</div><div class="line">1356</div><div class="line">1357</div><div class="line">1358</div><div class="line">1359</div><div class="line">1360</div><div class="line">1361</div><div class="line">1362</div><div class="line">1363</div><div class="line">1364</div><div class="line">1365</div><div class="line">1366</div><div class="line">1367</div><div class="line">1368</div><div class="line">1369</div><div class="line">1370</div><div class="line">1371</div><div class="line">1372</div><div class="line">1373</div><div class="line">1374</div><div class="line">1375</div><div class="line">1376</div><div class="line">1377</div><div class="line">1378</div><div class="line">1379</div><div class="line">1380</div><div class="line">1381</div><div class="line">1382</div><div class="line">1383</div><div class="line">1384</div><div class="line">1385</div><div class="line">1386</div><div class="line">1387</div><div class="line">1388</div><div class="line">1389</div><div class="line">1390</div><div class="line">1391</div><div class="line">1392</div><div class="line">1393</div><div class="line">1394</div><div class="line">1395</div><div class="line">1396</div><div class="line">1397</div><div class="line">1398</div><div class="line">1399</div><div class="line">1400</div><div class="line">1401</div><div class="line">1402</div><div class="line">1403</div><div class="line">1404</div><div class="line">1405</div><div class="line">1406</div><div class="line">1407</div><div class="line">1408</div><div class="line">1409</div><div class="line">1410</div><div class="line">1411</div><div class="line">1412</div><div class="line">1413</div><div class="line">1414</div><div class="line">1415</div><div class="line">1416</div><div class="line">1417</div><div class="line">1418</div><div class="line">1419</div><div class="line">1420</div><div class="line">1421</div><div class="line">1422</div><div class="line">1423</div><div class="line">1424</div><div class="line">1425</div><div class="line">1426</div><div class="line">1427</div><div class="line">1428</div><div class="line">1429</div><div class="line">1430</div><div class="line">1431</div><div class="line">1432</div><div class="line">1433</div><div class="line">1434</div><div class="line">1435</div><div class="line">1436</div><div class="line">1437</div><div class="line">1438</div><div class="line">1439</div><div class="line">1440</div><div class="line">1441</div><div class="line">1442</div><div class="line">1443</div><div class="line">1444</div><div class="line">1445</div><div class="line">1446</div><div class="line">1447</div><div class="line">1448</div><div class="line">1449</div><div class="line">1450</div><div class="line">1451</div><div class="line">1452</div><div class="line">1453</div><div class="line">1454</div><div class="line">1455</div><div class="line">1456</div><div class="line">1457</div><div class="line">1458</div><div class="line">1459</div><div class="line">1460</div><div class="line">1461</div><div class="line">1462</div><div class="line">1463</div><div class="line">1464</div><div class="line">1465</div><div class="line">1466</div><div class="line">1467</div><div class="line">1468</div><div class="line">1469</div><div class="line">1470</div><div class="line">1471</div><div class="line">1472</div><div class="line">1473</div><div class="line">1474</div><div class="line">1475</div><div class="line">1476</div><div class="line">1477</div><div class="line">1478</div><div class="line">1479</div><div class="line">1480</div><div class="line">1481</div><div class="line">1482</div><div class="line">1483</div><div class="line">1484</div><div class="line">1485</div><div class="line">1486</div><div class="line">1487</div><div class="line">1488</div><div class="line">1489</div><div class="line">1490</div><div class="line">1491</div><div class="line">1492</div><div class="line">1493</div><div class="line">1494</div><div class="line">1495</div><div class="line">1496</div><div class="line">1497</div><div class="line">1498</div><div class="line">1499</div><div class="line">1500</div><div class="line">1501</div><div class="line">1502</div><div class="line">1503</div><div class="line">1504</div><div class="line">1505</div><div class="line">1506</div><div class="line">1507</div><div class="line">1508</div><div class="line">1509</div><div class="line">1510</div><div class="line">1511</div><div class="line">1512</div><div class="line">1513</div><div class="line">1514</div><div class="line">1515</div><div class="line">1516</div><div class="line">1517</div><div class="line">1518</div><div class="line">1519</div><div class="line">1520</div><div class="line">1521</div><div class="line">1522</div><div class="line">1523</div><div class="line">1524</div><div class="line">1525</div><div class="line">1526</div><div class="line">1527</div><div class="line">1528</div><div class="line">1529</div><div class="line">1530</div><div class="line">1531</div><div class="line">1532</div><div class="line">1533</div><div class="line">1534</div><div class="line">1535</div><div class="line">1536</div><div class="line">1537</div><div class="line">1538</div><div class="line">1539</div><div class="line">1540</div><div class="line">1541</div><div class="line">1542</div><div class="line">1543</div><div class="line">1544</div><div class="line">1545</div><div class="line">1546</div><div class="line">1547</div><div class="line">1548</div><div class="line">1549</div><div class="line">1550</div><div class="line">1551</div><div class="line">1552</div><div class="line">1553</div><div class="line">1554</div><div class="line">1555</div><div class="line">1556</div><div class="line">1557</div><div class="line">1558</div><div class="line">1559</div><div class="line">1560</div><div class="line">1561</div><div class="line">1562</div><div class="line">1563</div><div class="line">1564</div><div class="line">1565</div><div class="line">1566</div><div class="line">1567</div><div class="line">1568</div><div class="line">1569</div><div class="line">1570</div><div class="line">1571</div><div class="line">1572</div><div class="line">1573</div><div class="line">1574</div><div class="line">1575</div><div class="line">1576</div><div class="line">1577</div><div class="line">1578</div><div class="line">1579</div><div class="line">1580</div><div class="line">1581</div><div class="line">1582</div><div class="line">1583</div><div class="line">1584</div><div class="line">1585</div><div class="line">1586</div><div class="line">1587</div><div class="line">1588</div><div class="line">1589</div><div class="line">1590</div><div class="line">1591</div><div class="line">1592</div><div class="line">1593</div><div class="line">1594</div><div class="line">1595</div><div class="line">1596</div><div class="line">1597</div><div class="line">1598</div><div class="line">1599</div><div class="line">1600</div><div class="line">1601</div><div class="line">1602</div><div class="line">1603</div><div class="line">1604</div><div class="line">1605</div><div class="line">1606</div><div class="line">1607</div><div class="line">1608</div><div class="line">1609</div><div class="line">1610</div><div class="line">1611</div><div class="line">1612</div><div class="line">1613</div><div class="line">1614</div><div class="line">1615</div><div class="line">1616</div><div class="line">1617</div><div class="line">1618</div><div class="line">1619</div><div class="line">1620</div><div class="line">1621</div><div class="line">1622</div><div class="line">1623</div><div class="line">1624</div><div class="line">1625</div><div class="line">1626</div><div class="line">1627</div><div class="line">1628</div><div class="line">1629</div><div class="line">1630</div><div class="line">1631</div><div class="line">1632</div><div class="line">1633</div><div class="line">1634</div><div class="line">1635</div><div class="line">1636</div><div class="line">1637</div><div class="line">1638</div><div class="line">1639</div><div class="line">1640</div><div class="line">1641</div><div class="line">1642</div><div class="line">1643</div><div class="line">1644</div><div class="line">1645</div><div class="line">1646</div><div class="line">1647</div><div class="line">1648</div><div class="line">1649</div><div class="line">1650</div><div class="line">1651</div><div class="line">1652</div><div class="line">1653</div><div class="line">1654</div><div class="line">1655</div><div class="line">1656</div><div class="line">1657</div><div class="line">1658</div><div class="line">1659</div><div class="line">1660</div><div class="line">1661</div><div class="line">1662</div><div class="line">1663</div><div class="line">1664</div><div class="line">1665</div><div class="line">1666</div><div class="line">1667</div><div class="line">1668</div><div class="line">1669</div><div class="line">1670</div><div class="line">1671</div><div class="line">1672</div><div class="line">1673</div><div class="line">1674</div><div class="line">1675</div><div class="line">1676</div><div class="line">1677</div><div class="line">1678</div><div class="line">1679</div><div class="line">1680</div><div class="line">1681</div><div class="line">1682</div><div class="line">1683</div><div class="line">1684</div><div class="line">1685</div><div class="line">1686</div><div class="line">1687</div><div class="line">1688</div><div class="line">1689</div><div class="line">1690</div><div class="line">1691</div><div class="line">1692</div><div class="line">1693</div><div class="line">1694</div><div class="line">1695</div><div class="line">1696</div><div class="line">1697</div><div class="line">1698</div><div class="line">1699</div><div class="line">1700</div><div class="line">1701</div><div class="line">1702</div><div class="line">1703</div><div class="line">1704</div><div class="line">1705</div><div class="line">1706</div><div class="line">1707</div><div class="line">1708</div><div class="line">1709</div><div class="line">1710</div><div class="line">1711</div><div class="line">1712</div><div class="line">1713</div><div class="line">1714</div><div class="line">1715</div><div class="line">1716</div><div class="line">1717</div><div class="line">1718</div><div class="line">1719</div><div class="line">1720</div><div class="line">1721</div><div class="line">1722</div><div class="line">1723</div><div class="line">1724</div><div class="line">1725</div><div class="line">1726</div><div class="line">1727</div><div class="line">1728</div><div class="line">1729</div><div class="line">1730</div><div class="line">1731</div><div class="line">1732</div><div class="line">1733</div><div class="line">1734</div><div class="line">1735</div><div class="line">1736</div><div class="line">1737</div><div class="line">1738</div><div class="line">1739</div><div class="line">1740</div><div class="line">1741</div><div class="line">1742</div><div class="line">1743</div><div class="line">1744</div><div class="line">1745</div><div class="line">1746</div><div class="line">1747</div><div class="line">1748</div><div class="line">1749</div><div class="line">1750</div><div class="line">1751</div><div class="line">1752</div><div class="line">1753</div><div class="line">1754</div><div class="line">1755</div><div class="line">1756</div><div class="line">1757</div><div class="line">1758</div><div class="line">1759</div><div class="line">1760</div><div class="line">1761</div><div class="line">1762</div><div class="line">1763</div><div class="line">1764</div><div class="line">1765</div><div class="line">1766</div><div class="line">1767</div><div class="line">1768</div><div class="line">1769</div><div class="line">1770</div><div class="line">1771</div><div class="line">1772</div><div class="line">1773</div><div class="line">1774</div><div class="line">1775</div><div class="line">1776</div><div class="line">1777</div><div class="line">1778</div><div class="line">1779</div><div class="line">1780</div><div class="line">1781</div><div class="line">1782</div><div class="line">1783</div><div class="line">1784</div><div class="line">1785</div><div class="line">1786</div><div class="line">1787</div><div class="line">1788</div><div class="line">1789</div><div class="line">1790</div><div class="line">1791</div><div class="line">1792</div><div class="line">1793</div><div class="line">1794</div><div class="line">1795</div><div class="line">1796</div><div class="line">1797</div><div class="line">1798</div><div class="line">1799</div><div class="line">1800</div><div class="line">1801</div><div class="line">1802</div><div class="line">1803</div><div class="line">1804</div><div class="line">1805</div><div class="line">1806</div><div class="line">1807</div><div class="line">1808</div><div class="line">1809</div><div class="line">1810</div><div class="line">1811</div><div class="line">1812</div><div class="line">1813</div><div class="line">1814</div><div class="line">1815</div><div class="line">1816</div><div class="line">1817</div><div class="line">1818</div><div class="line">1819</div><div class="line">1820</div><div class="line">1821</div><div class="line">1822</div><div class="line">1823</div></pre></td><td class="code"><pre><div class="line">// World of Warcraft.cpp : 定义控制台应用程序的入口点。</div><div class="line">//</div><div class="line"></div><div class="line">#include &quot;stdafx.h&quot;</div><div class="line"></div><div class="line">#include &lt;cstdio&gt;</div><div class="line">#include &lt;string&gt;</div><div class="line">#include &lt;cstdlib&gt;</div><div class="line">#include &lt;cstring&gt;</div><div class="line">#include &lt;iostream&gt;</div><div class="line">#include &lt;vector&gt;</div><div class="line">#include &lt;map&gt;</div><div class="line">#include &lt;queue&gt;</div><div class="line"></div><div class="line">using namespace std;</div><div class="line">#define _CRT_SECURE_NO_WARNINGS</div><div class="line">int M, N, R, K, T;//基础数据</div><div class="line">int SoldierBlood[5];</div><div class="line">int SoldierAd[5];</div><div class="line">int CurrentTime;</div><div class="line"></div><div class="line">string toString(int t)</div><div class="line">&#123;</div><div class="line">	char buf[10];</div><div class="line">	sprintf_s(buf, &quot;%d&quot;, t);</div><div class="line">	string b = buf;</div><div class="line">	return b;</div><div class="line">&#125;</div><div class="line">string printNowTime()</div><div class="line">&#123;</div><div class="line">	int t = CurrentTime;</div><div class="line">	int h = t / 60;</div><div class="line">	int m = t % 60;</div><div class="line">	string s;</div><div class="line">	s += h / 100 + &apos;0&apos;;</div><div class="line">	s += (h / 10) % 10 + &apos;0&apos;;</div><div class="line">	s += h % 10 + &apos;0&apos;;</div><div class="line">	s += &apos;:&apos;;</div><div class="line">	s += m / 10 + &apos;0&apos;;</div><div class="line">	s += m % 10 + &apos;0&apos;;</div><div class="line">	return s + &apos; &apos;;</div><div class="line">&#125;</div><div class="line"></div><div class="line">class Weapon</div><div class="line">&#123;</div><div class="line">protected:</div><div class="line">	int Attack;</div><div class="line">	int Belong;//存放的soldier的uid</div><div class="line">public:</div><div class="line">	int getAttack()</div><div class="line">	&#123;</div><div class="line">		return Attack;</div><div class="line">	&#125;</div><div class="line">	void setBelong(int t)</div><div class="line">	&#123;</div><div class="line">		Belong = t;</div><div class="line">	&#125;</div><div class="line">	virtual void init() = 0;</div><div class="line">	virtual int lose() = 0;//返回0的时候表示失去该武器</div><div class="line">	virtual int getType() = 0;//0 sword 1 bomb 2 arrow</div><div class="line">	virtual string getPrint() = 0;</div><div class="line">	virtual ~Weapon() &#123;&#125;;</div><div class="line">&#125;;</div><div class="line">class Sword:public Weapon</div><div class="line">&#123;</div><div class="line">public:</div><div class="line">	void init();</div><div class="line">	int lose()</div><div class="line">	&#123;</div><div class="line">		Attack *= 0.8;</div><div class="line">		return Attack;</div><div class="line">	&#125;</div><div class="line">	int getType()</div><div class="line">	&#123;</div><div class="line">		return 0;</div><div class="line">	&#125;</div><div class="line">	void setAttack(int t)</div><div class="line">	&#123;</div><div class="line">		Attack = t*0.2;</div><div class="line">	&#125;</div><div class="line">	string getPrint()</div><div class="line">	&#123;</div><div class="line">		return &quot;sword(&quot; + toString(Attack) + &apos;)&apos;;</div><div class="line">	&#125;</div><div class="line">&#125;;</div><div class="line">class Arrow :public Weapon</div><div class="line">&#123;</div><div class="line">private:</div><div class="line">	</div><div class="line">public:</div><div class="line">	int time;</div><div class="line">	void init()</div><div class="line">	&#123;</div><div class="line">		Attack = 0;</div><div class="line">		time = 3;</div><div class="line">	&#125;</div><div class="line">	int lose()</div><div class="line">	&#123;</div><div class="line">		time--;</div><div class="line">		return time;</div><div class="line">	&#125;</div><div class="line">	int getType()</div><div class="line">	&#123;</div><div class="line">		return 2;</div><div class="line">	&#125;</div><div class="line">	string getPrint()</div><div class="line">	&#123;</div><div class="line">		return &quot;arrow(&quot; + toString(time) + &apos;)&apos;;</div><div class="line">	&#125;</div><div class="line">&#125;;</div><div class="line">class Bomb :public Weapon</div><div class="line">&#123;</div><div class="line">public:</div><div class="line">	void init()</div><div class="line">	&#123;</div><div class="line">		Attack = 0;</div><div class="line">	&#125;</div><div class="line">	int lose()//只能用一次,只要调用了就没了</div><div class="line">	&#123;</div><div class="line">		return 0;</div><div class="line">	&#125;</div><div class="line">	int getType()</div><div class="line">	&#123;</div><div class="line">		return 1;</div><div class="line">	&#125;</div><div class="line">	string getPrint()</div><div class="line">	&#123;</div><div class="line">		return &quot;bomb&quot;;</div><div class="line">	&#125;</div><div class="line">&#125;;</div><div class="line"></div><div class="line">class Soldier </div><div class="line">&#123;</div><div class="line">protected:</div><div class="line">	</div><div class="line">	int Attack;</div><div class="line">	int Id;</div><div class="line">	int uId;</div><div class="line">	int Camp;//0:red,1:blue;</div><div class="line">	</div><div class="line">	</div><div class="line">public:</div><div class="line">	int Blood;//&lt;=0即为死亡</div><div class="line">	int BloodWin;//</div><div class="line">	int isLive;//0 die 1 live -1 runaway</div><div class="line">	int tArrow;//实现同时射箭的处理。先记录下中箭的数值，在战争开始时再结算中箭的伤害。</div><div class="line">	Arrow* hasArrow;//没有即为NULL</div><div class="line">	Bomb* hasBomb;//</div><div class="line">	int dieByArrow;</div><div class="line">	string getCampName()</div><div class="line">	&#123;</div><div class="line">		if (Camp == 0) return &quot;red&quot;;</div><div class="line">		return &quot;blue&quot;;</div><div class="line">	&#125;</div><div class="line">	string getPrint()//return like this &quot;red lion 2&quot;</div><div class="line">	&#123;</div><div class="line">		string s;</div><div class="line">		s += getCampName() + &apos; &apos; + getName() + &apos; &apos; +toString(Id);</div><div class="line">		return s;</div><div class="line">	&#125;</div><div class="line">	Soldier()</div><div class="line">	&#123;</div><div class="line">		isLive = 1;</div><div class="line">		hasArrow = NULL;</div><div class="line">		hasBomb = NULL;</div><div class="line">		tArrow = 0;</div><div class="line">		BloodWin = 0;</div><div class="line">		dieByArrow = 0;</div><div class="line">	&#125;</div><div class="line">	void attackByArrow(int t)</div><div class="line">	&#123;</div><div class="line">		tArrow += t;</div><div class="line">	&#125;</div><div class="line">	void loseByArrow()</div><div class="line">	&#123;</div><div class="line">		loseBlood(tArrow);</div><div class="line">		tArrow = 0;</div><div class="line">	&#125;</div><div class="line">	void loseBlood(int t)//降低生命值</div><div class="line">	&#123;</div><div class="line">		Blood -= t;</div><div class="line">		if (Blood &lt;= 0)</div><div class="line">		&#123;</div><div class="line">			isLive = 0;</div><div class="line">			//Todo</div><div class="line">			die();</div><div class="line">		&#125;</div><div class="line">	&#125;</div><div class="line">	int getBlood()</div><div class="line">	&#123;</div><div class="line">		return Blood;</div><div class="line">	&#125;</div><div class="line">	int getAttack()</div><div class="line">	&#123;</div><div class="line">		return Attack;</div><div class="line">	&#125;</div><div class="line">	void setId(int t)</div><div class="line">	&#123;</div><div class="line">		Id = t;</div><div class="line">	&#125;</div><div class="line">	int getId()</div><div class="line">	&#123;</div><div class="line">		return Id;</div><div class="line">	&#125;</div><div class="line">	void setuId(int t)</div><div class="line">	&#123;</div><div class="line">		uId = t;</div><div class="line">	&#125;</div><div class="line">	int getuId()</div><div class="line">	&#123;</div><div class="line">		return uId;</div><div class="line">	&#125;</div><div class="line">	void setCamp(int t)</div><div class="line">	&#123;</div><div class="line">		Camp = t;</div><div class="line">	&#125;</div><div class="line">	int getCamp()</div><div class="line">	&#123;</div><div class="line">		return Camp;</div><div class="line">	&#125;</div><div class="line">	virtual void init() = 0;//武士初始化，推迟到子类中实现</div><div class="line">	virtual int fight() = 0;//返回攻击的攻击力</div><div class="line">	virtual int fightback() = 0;//返回反击的攻击力</div><div class="line">	virtual int getType() = 0;//返回该武士的类型编号，0： dragon 、1：ninja、2：iceman、3：lion、4：wolf</div><div class="line">	virtual string getName() = 0;//返回该武士的类型</div><div class="line">	virtual void die() = 0;//死亡</div><div class="line">	virtual void winFight(Soldier* p,int t) = 0;//获胜</div><div class="line">	virtual void loseFight(Soldier* p,int t) = 0;//输掉</div><div class="line">	virtual void drawFight(Soldier* p,int t) = 0;//平局</div><div class="line">	virtual void loseWeapon(int t) = 0;</div><div class="line">	virtual void printWeapon() = 0;</div><div class="line">	virtual ~Soldier() &#123;&#125;//虚函数析构</div><div class="line">&#125;;</div><div class="line"></div><div class="line">int getSwordAttack(Weapon* p)//fight时处理sword的事件，返回sword的攻击力</div><div class="line">&#123;</div><div class="line">	if (!p) return 0;</div><div class="line">	if (p-&gt;getType() != 0) return 0;//not sword,return 0</div><div class="line">	int t = p-&gt;getAttack();</div><div class="line">	//p-&gt;lose();//sword 变钝  // 对打时处理吧</div><div class="line">	//if (p-&gt;getAttack() == 0)</div><div class="line">	//&#123;</div><div class="line">	//	delete p;</div><div class="line">	//	p = NULL;</div><div class="line">	//&#125;</div><div class="line">	return t;</div><div class="line">&#125;</div><div class="line">void getWeapon(Soldier * t,Weapon* &amp;p, int code);//获得武器</div><div class="line"></div><div class="line">class Dragon :public Soldier</div><div class="line">&#123;</div><div class="line">private:</div><div class="line">	</div><div class="line">public:</div><div class="line">	double Morale;</div><div class="line">	Weapon* mWeapon;//NULL代表没有武器</div><div class="line">	Dragon()</div><div class="line">	&#123;</div><div class="line">		Blood = SoldierBlood[0];</div><div class="line">		Attack = SoldierAd[0];</div><div class="line">		mWeapon = NULL;</div><div class="line">	&#125;</div><div class="line">	double getMorale()</div><div class="line">	&#123;</div><div class="line">		return Morale;</div><div class="line">	&#125;</div><div class="line">	int getWeaponType()//-1 no weapon,0 sword</div><div class="line">	&#123;</div><div class="line">		if (mWeapon == NULL) return -1;</div><div class="line">		return mWeapon-&gt;getType();</div><div class="line">	&#125;</div><div class="line">	void init();</div><div class="line">	</div><div class="line">	void die()</div><div class="line">	&#123;</div><div class="line">		//if (mWeapon != NULL) delete mWeapon;</div><div class="line">		isLive = 0;</div><div class="line">		Blood = 0;</div><div class="line">	&#125;</div><div class="line">	int getType()</div><div class="line">	&#123;</div><div class="line">		return 0;</div><div class="line">	&#125;</div><div class="line">	string getName()</div><div class="line">	&#123;</div><div class="line">		return &quot;dragon&quot;;</div><div class="line">	&#125;</div><div class="line">	void yell(int t);//judge whether to yell</div><div class="line">	</div><div class="line">	void winFight(Soldier* p,int t)</div><div class="line">	&#123;</div><div class="line">		BloodWin += 8;</div><div class="line">		Morale += 0.2;</div><div class="line">		yell(t);</div><div class="line">	&#125;</div><div class="line">	</div><div class="line">	void loseFight(Soldier * p,int t)</div><div class="line">	&#123;</div><div class="line">		</div><div class="line">	&#125;</div><div class="line">	void drawFight(Soldier * p,int t)</div><div class="line">	&#123;</div><div class="line">		Morale -= 0.2;</div><div class="line">		yell(t);</div><div class="line">	&#125;</div><div class="line">	int fight()</div><div class="line">	&#123;</div><div class="line">		int ad = Attack;</div><div class="line">		ad += getSwordAttack(mWeapon);</div><div class="line">		return ad;</div><div class="line">	&#125;</div><div class="line">	int fightback()</div><div class="line">	&#123;</div><div class="line">		int ad = Attack / 2;</div><div class="line">		ad += getSwordAttack(mWeapon);</div><div class="line">		return ad;</div><div class="line">	&#125;</div><div class="line">	void loseWeapon(int t)//战斗后调用</div><div class="line">	&#123;</div><div class="line">		if (mWeapon&amp;&amp;mWeapon-&gt;getType()==t)</div><div class="line">		&#123;</div><div class="line">			if (mWeapon-&gt;lose() == 0)</div><div class="line">			&#123;</div><div class="line">				//delete mWeapon;</div><div class="line">				mWeapon = NULL;</div><div class="line">			&#125;</div><div class="line">		&#125;</div><div class="line">	&#125;</div><div class="line">	void printWeapon()</div><div class="line">	&#123;</div><div class="line">		string s = printNowTime() + getPrint() + &quot; has &quot;;</div><div class="line">		if (mWeapon == NULL)</div><div class="line">			s += &quot;no weapon&quot;;</div><div class="line">		else</div><div class="line">			s += mWeapon-&gt;getPrint();</div><div class="line">		puts(s.c_str());</div><div class="line">	&#125;</div><div class="line">&#125;;</div><div class="line">class Ninja :public Soldier</div><div class="line">&#123;</div><div class="line">private:</div><div class="line">	</div><div class="line">public:</div><div class="line">	Weapon *mWeapon1, *mWeapon2;</div><div class="line">	Ninja()</div><div class="line">	&#123;</div><div class="line">		Blood = SoldierBlood[1];</div><div class="line">		Attack = SoldierAd[1];</div><div class="line">		mWeapon1 = NULL;</div><div class="line">		mWeapon2 = NULL;</div><div class="line">	&#125;</div><div class="line">	int getWeaponType1()</div><div class="line">	&#123;</div><div class="line">		if (mWeapon1 == NULL) return -1;</div><div class="line">		return mWeapon1-&gt;getType();</div><div class="line">	&#125;</div><div class="line">	int getWeaponType2()</div><div class="line">	&#123;</div><div class="line">		if (mWeapon2 == NULL) return -1;</div><div class="line">		return mWeapon2-&gt;getType();</div><div class="line">	&#125;</div><div class="line">	int getType()</div><div class="line">	&#123;</div><div class="line">		return 1;</div><div class="line">	&#125;</div><div class="line">	string getName()</div><div class="line">	&#123;</div><div class="line">		return &quot;ninja&quot;;</div><div class="line">	&#125;</div><div class="line">	void init()</div><div class="line">	&#123;</div><div class="line">		getWeapon(this,mWeapon1, Id % 3);</div><div class="line">		if (mWeapon1) mWeapon1-&gt;setBelong(getuId());//设置属于谁的</div><div class="line">		getWeapon(this,mWeapon2, (Id+1) % 3);</div><div class="line">		if (mWeapon2) mWeapon2-&gt;setBelong(getuId());//设置属于谁的</div><div class="line">	&#125;</div><div class="line">	void die()</div><div class="line">	&#123;</div><div class="line">		//if (mWeapon1) delete mWeapon1;</div><div class="line">		//if (mWeapon2) delete mWeapon2;</div><div class="line">		isLive = 0;</div><div class="line">	&#125;</div><div class="line">	void winFight(Soldier *p, int t)</div><div class="line">	&#123;</div><div class="line">		BloodWin += 8;</div><div class="line">	&#125;</div><div class="line">	void loseFight(Soldier *p, int t)</div><div class="line">	&#123;</div><div class="line"></div><div class="line">	&#125;</div><div class="line">	void drawFight(Soldier *p, int t)</div><div class="line">	&#123;</div><div class="line"></div><div class="line">	&#125;</div><div class="line">	int fight()</div><div class="line">	&#123;</div><div class="line">		int ad = Attack;</div><div class="line">		if(mWeapon1)ad += getSwordAttack(mWeapon1);</div><div class="line">		if(mWeapon2)ad += getSwordAttack(mWeapon2);</div><div class="line">		return ad;</div><div class="line">	&#125;</div><div class="line">	void loseWeapon(int t)//战斗后调用</div><div class="line">	&#123;</div><div class="line">		if (mWeapon1&amp;&amp;mWeapon1-&gt;getType()==t)</div><div class="line">		&#123;</div><div class="line">			if (mWeapon1-&gt;lose()==0)</div><div class="line">			&#123;</div><div class="line">				//delete mWeapon1;</div><div class="line">				mWeapon1 = NULL;</div><div class="line">			&#125;</div><div class="line">		&#125;</div><div class="line">		if (mWeapon2&amp;&amp;mWeapon2-&gt;getType() == t)</div><div class="line">		&#123;</div><div class="line">			if (mWeapon2-&gt;lose()==0)</div><div class="line">			&#123;</div><div class="line">				//delete mWeapon2;</div><div class="line">				mWeapon2 = NULL;</div><div class="line">			&#125;</div><div class="line">		&#125;</div><div class="line">	&#125;</div><div class="line">	int fightback()//不反击，所以认为是0</div><div class="line">	&#123;</div><div class="line">		return 0;</div><div class="line">	&#125;</div><div class="line">	void printWeapon()</div><div class="line">	&#123;</div><div class="line">		string s = printNowTime() + getPrint() + &quot; has &quot;;</div><div class="line">		if (mWeapon1 == NULL &amp;&amp; mWeapon2 == NULL)</div><div class="line">			s += &quot;no weapon&quot;;</div><div class="line">		else if (mWeapon1 == NULL)</div><div class="line">		&#123;</div><div class="line">			s += mWeapon2-&gt;getPrint();</div><div class="line">		&#125;</div><div class="line">		else if (mWeapon2 == NULL)</div><div class="line">		&#123;</div><div class="line">			s += mWeapon1-&gt;getPrint();</div><div class="line">		&#125;</div><div class="line">		else </div><div class="line">		&#123;</div><div class="line">			if (mWeapon1-&gt;getType() == 2)</div><div class="line">				s += mWeapon1-&gt;getPrint();</div><div class="line">			if (mWeapon2-&gt;getType() == 2)</div><div class="line">				s += mWeapon2-&gt;getPrint();</div><div class="line">			if (mWeapon1-&gt;getType() == 1)</div><div class="line">			&#123;</div><div class="line">				if (s[s.size() - 1] != &apos; &apos;) s += &apos;,&apos;;</div><div class="line">				s += mWeapon1-&gt;getPrint();</div><div class="line">			&#125;</div><div class="line">			if (mWeapon2-&gt;getType() == 1)</div><div class="line">			&#123;</div><div class="line">				if (s[s.size() - 1] != &apos; &apos;) s += &apos;,&apos;;</div><div class="line">				s += mWeapon2-&gt;getPrint();</div><div class="line">			&#125;</div><div class="line">			if (mWeapon1-&gt;getType() == 0)</div><div class="line">			&#123;</div><div class="line">				if (s[s.size() - 1] != &apos; &apos;) s += &apos;,&apos;;</div><div class="line">				s += mWeapon1-&gt;getPrint();</div><div class="line">			&#125;</div><div class="line">			if (mWeapon2-&gt;getType() == 0)</div><div class="line">			&#123;</div><div class="line">				if (s[s.size() - 1] != &apos; &apos;) s += &apos;,&apos;;</div><div class="line">				s += mWeapon2-&gt;getPrint();</div><div class="line">			&#125;</div><div class="line">		&#125;</div><div class="line">		puts(s.c_str());</div><div class="line">	&#125;</div><div class="line">&#125;;</div><div class="line"></div><div class="line">class Iceman :public Soldier</div><div class="line">&#123;</div><div class="line">private:</div><div class="line">	</div><div class="line">public:</div><div class="line">	Weapon *mWeapon;</div><div class="line">	int Step;</div><div class="line">	Iceman()</div><div class="line">	&#123;</div><div class="line">		Blood = SoldierBlood[2];</div><div class="line">		Attack = SoldierAd[2];</div><div class="line">		mWeapon = NULL;</div><div class="line">		Step = 0;</div><div class="line">	&#125;</div><div class="line">	int getWeaponType()</div><div class="line">	&#123;</div><div class="line">		if (mWeapon == NULL) return -1;</div><div class="line">		return mWeapon-&gt;getType();</div><div class="line">	&#125;</div><div class="line">	int getType()</div><div class="line">	&#123;</div><div class="line">		return 2;</div><div class="line">	&#125;</div><div class="line">	string getName()</div><div class="line">	&#123;</div><div class="line">		return &quot;iceman&quot;;</div><div class="line">	&#125;</div><div class="line">	void init()</div><div class="line">	&#123;</div><div class="line">		getWeapon(this,mWeapon, Id % 3);</div><div class="line">		if (mWeapon) mWeapon-&gt;setBelong(getuId());//设置属于谁的</div><div class="line">	&#125;</div><div class="line">	void die()</div><div class="line">	&#123;</div><div class="line">		//if (mWeapon) delete mWeapon;</div><div class="line">		isLive = 0;</div><div class="line">	&#125;</div><div class="line">	void winFight(Soldier *p, int t)</div><div class="line">	&#123;</div><div class="line">		BloodWin += 8;</div><div class="line">	&#125;</div><div class="line">	void loseFight(Soldier *p, int t)</div><div class="line">	&#123;</div><div class="line"></div><div class="line">	&#125;</div><div class="line">	void drawFight(Soldier *p, int t)</div><div class="line">	&#123;</div><div class="line"></div><div class="line">	&#125;</div><div class="line">	void loseWeapon(int t)//战斗后调用</div><div class="line">	&#123;</div><div class="line">		if (mWeapon&amp;&amp;mWeapon-&gt;getType() == t)</div><div class="line">		&#123;</div><div class="line">			if (mWeapon-&gt;lose()== 0)</div><div class="line">			&#123;</div><div class="line">				//delete mWeapon;</div><div class="line">				mWeapon = NULL;</div><div class="line">			&#125;</div><div class="line">		&#125;</div><div class="line">	&#125;</div><div class="line">	void Move()</div><div class="line">	&#123;</div><div class="line">		Step++;</div><div class="line">		if (Step == 2)</div><div class="line">		&#123;</div><div class="line">			Step = 0;</div><div class="line">			Blood -= 9;</div><div class="line">			Attack += 20;</div><div class="line">			if (Blood &lt;= 0) Blood = 1;</div><div class="line">		&#125;</div><div class="line">	&#125;</div><div class="line">	int fight()</div><div class="line">	&#123;</div><div class="line">		int ad = Attack;</div><div class="line">		ad += getSwordAttack(mWeapon);</div><div class="line">		return ad;</div><div class="line">	&#125;</div><div class="line">	int fightback()</div><div class="line">	&#123;</div><div class="line">		int ad = Attack / 2;</div><div class="line">		ad += getSwordAttack(mWeapon);</div><div class="line">		return ad;</div><div class="line">	&#125;</div><div class="line">	void printWeapon()</div><div class="line">	&#123;</div><div class="line">		string s = printNowTime() + getPrint() + &quot; has &quot;;</div><div class="line">		if (mWeapon == NULL)</div><div class="line">			s += &quot;no weapon&quot;;</div><div class="line">		else</div><div class="line">			s += mWeapon-&gt;getPrint();</div><div class="line">		puts(s.c_str());</div><div class="line">	&#125;</div><div class="line">&#125;;</div><div class="line">class Lion :public Soldier</div><div class="line">&#123;</div><div class="line">private:</div><div class="line">	int	Loyalty;</div><div class="line">	int tBlood;//要转移的Blood</div><div class="line">public:</div><div class="line">	Lion()</div><div class="line">	&#123;</div><div class="line">		Blood = SoldierBlood[3];</div><div class="line">		Attack = SoldierAd[3];</div><div class="line">	&#125;</div><div class="line">	void moveBlood()</div><div class="line">	&#123;</div><div class="line">		tBlood = Blood-tArrow;</div><div class="line">	&#125;</div><div class="line">	void init();</div><div class="line">	void die()</div><div class="line">	&#123;</div><div class="line">		isLive = 0;</div><div class="line">	&#125;</div><div class="line">	int getLoyalty()</div><div class="line">	&#123;</div><div class="line">		return Loyalty;</div><div class="line">	&#125;</div><div class="line">	void loseLoyalty()</div><div class="line">	&#123;</div><div class="line">		Loyalty -= K;</div><div class="line">	&#125;</div><div class="line">	int fight()</div><div class="line">	&#123;</div><div class="line">		return Attack;</div><div class="line">	&#125;</div><div class="line">	int fightback()</div><div class="line">	&#123;</div><div class="line">		return Attack / 2;</div><div class="line">	&#125;</div><div class="line">	void winFight(Soldier *p, int t)</div><div class="line">	&#123;</div><div class="line">		BloodWin += 8;</div><div class="line">	&#125;</div><div class="line">	void loseFight(Soldier *p, int t)</div><div class="line">	&#123;</div><div class="line">		if(dieByArrow==0)p-&gt;Blood += tBlood;</div><div class="line">	&#125;</div><div class="line">	void drawFight(Soldier *p, int t)</div><div class="line">	&#123;</div><div class="line">		loseLoyalty();</div><div class="line">	&#125;</div><div class="line">	void loseWeapon(int t)</div><div class="line">	&#123;</div><div class="line"></div><div class="line">	&#125;</div><div class="line">	int getType()</div><div class="line">	&#123;</div><div class="line">		return 3;</div><div class="line">	&#125;</div><div class="line">	string getName()</div><div class="line">	&#123;</div><div class="line">		return &quot;lion&quot;;</div><div class="line">	&#125;</div><div class="line">	void runAway()</div><div class="line">	&#123;</div><div class="line">		Blood = 0;</div><div class="line">		isLive = 0;//暂时先设置为0吧，逃跑了就当他死了</div><div class="line">	&#125;</div><div class="line">	void printWeapon()</div><div class="line">	&#123;</div><div class="line">		string s = printNowTime() + getPrint() + &quot; has &quot;;</div><div class="line">		s += &quot;no weapon&quot;;</div><div class="line">		puts(s.c_str());</div><div class="line">	&#125;</div><div class="line">&#125;;</div><div class="line">class Wolf :public Soldier</div><div class="line">&#123;</div><div class="line">private:</div><div class="line">	</div><div class="line">public:</div><div class="line">	//Weapon* mWeapon;</div><div class="line">	Weapon* swordWeapon;</div><div class="line">	Arrow* arrowWeapon;</div><div class="line">	Bomb*  bombWeapon;</div><div class="line">	Wolf()</div><div class="line">	&#123;</div><div class="line">		Blood = SoldierBlood[4];</div><div class="line">		Attack = SoldierAd[4];</div><div class="line">	&#125;</div><div class="line">	/*int getWeaponType()</div><div class="line">	&#123;</div><div class="line">		return WeaponType;</div><div class="line">	&#125;*/</div><div class="line">	void init()</div><div class="line">	&#123;</div><div class="line">		swordWeapon = NULL;</div><div class="line">		arrowWeapon = NULL;</div><div class="line">		bombWeapon = NULL;</div><div class="line">	&#125;</div><div class="line">	void die()</div><div class="line">	&#123;</div><div class="line">		//if (swordWeapon) delete swordWeapon;</div><div class="line">		//if ()</div><div class="line">		isLive = 0;</div><div class="line">	&#125;</div><div class="line">	void winFight(Soldier *p, int t)</div><div class="line">	&#123;</div><div class="line">		switch (p-&gt;getType())</div><div class="line">		&#123;</div><div class="line">			case 0:</div><div class="line">			&#123;</div><div class="line">				takeWeapon(((Dragon *)p)-&gt;mWeapon);</div><div class="line">				break;</div><div class="line">			&#125;</div><div class="line">			case 1:</div><div class="line">			&#123;</div><div class="line">				takeWeapon(((Ninja *)p)-&gt;mWeapon1);</div><div class="line">				takeWeapon(((Ninja *)p)-&gt;mWeapon2);</div><div class="line">				break;</div><div class="line">			&#125;</div><div class="line">			case 2:</div><div class="line">			&#123;</div><div class="line">				takeWeapon(((Iceman *)p)-&gt;mWeapon);</div><div class="line">				break;</div><div class="line">			&#125;</div><div class="line">			case 4:</div><div class="line">			&#123;</div><div class="line">				takeWeapon(((Wolf *)p)-&gt;swordWeapon);</div><div class="line">				takeWeapon(((Wolf *)p)-&gt;bombWeapon);</div><div class="line">				takeWeapon(((Wolf *)p)-&gt;arrowWeapon);</div><div class="line">				break;</div><div class="line">			&#125;</div><div class="line">		&#125;</div><div class="line">		BloodWin += 8;</div><div class="line">	&#125;</div><div class="line">	void loseFight(Soldier *p, int t)</div><div class="line">	&#123;</div><div class="line"></div><div class="line">	&#125;</div><div class="line">	void drawFight(Soldier *p, int t)</div><div class="line">	&#123;</div><div class="line"></div><div class="line">	&#125;</div><div class="line">	void takeWeapon(Weapon *p)//缴获武器</div><div class="line">	&#123;</div><div class="line">		if (p == NULL) return;</div><div class="line">		if (p-&gt;getType() == 0&amp;&amp;swordWeapon==NULL)</div><div class="line">		&#123;</div><div class="line">			swordWeapon = p;</div><div class="line">		&#125;</div><div class="line">		if (p-&gt;getType() == 1 &amp;&amp; bombWeapon == NULL)</div><div class="line">		&#123;</div><div class="line">			bombWeapon =(Bomb *) p;</div><div class="line">			hasBomb = (Bomb *)p;</div><div class="line">		&#125;</div><div class="line">		if (p-&gt;getType() == 2 &amp;&amp; arrowWeapon == NULL)</div><div class="line">		&#123;</div><div class="line">			arrowWeapon = (Arrow *)p;</div><div class="line">			hasArrow = (Arrow *)p;</div><div class="line">		&#125;</div><div class="line">	&#125;</div><div class="line">	int fight()</div><div class="line">	&#123;</div><div class="line">		int ad = Attack;</div><div class="line">		ad += getSwordAttack(swordWeapon);</div><div class="line">		return ad;</div><div class="line">	&#125;</div><div class="line">	int fightback()</div><div class="line">	&#123;</div><div class="line">		int ad = Attack / 2;</div><div class="line">		ad += getSwordAttack(swordWeapon);</div><div class="line">		return ad;</div><div class="line">	&#125;</div><div class="line">	void loseWeapon(int t)//战斗后调用</div><div class="line">	&#123;</div><div class="line">		if (swordWeapon&amp;&amp;t==0)</div><div class="line">		&#123;</div><div class="line">			if (swordWeapon-&gt;lose() == 0)</div><div class="line">			&#123;</div><div class="line">				//delete swordWeapon;</div><div class="line">				swordWeapon = NULL;</div><div class="line">			&#125;</div><div class="line">		&#125;</div><div class="line">		if (bombWeapon&amp;&amp;t == 1)</div><div class="line">		&#123;</div><div class="line">			if (bombWeapon-&gt;lose() == 0)</div><div class="line">			&#123;</div><div class="line">				//delete bombWeapon;</div><div class="line">				bombWeapon = NULL;</div><div class="line">			&#125;</div><div class="line">		&#125;</div><div class="line">		if (arrowWeapon&amp;&amp;t == 2)</div><div class="line">		&#123;</div><div class="line">			if (arrowWeapon-&gt;lose() == 0)</div><div class="line">			&#123;</div><div class="line">				//delete arrowWeapon;</div><div class="line">				arrowWeapon = NULL;</div><div class="line">			&#125;</div><div class="line">		&#125;</div><div class="line">	&#125;</div><div class="line">	int getType()</div><div class="line">	&#123;</div><div class="line">		return 4;</div><div class="line">	&#125;</div><div class="line">	string getName()</div><div class="line">	&#123;</div><div class="line">		return &quot;wolf&quot;;</div><div class="line">	&#125;</div><div class="line">	void printWeapon()</div><div class="line">	&#123;</div><div class="line">		string s = printNowTime() + getPrint() + &quot; has &quot;;</div><div class="line">		if (swordWeapon == NULL &amp;&amp; bombWeapon == NULL &amp;&amp; arrowWeapon ==NULL)</div><div class="line">			s += &quot;no weapon&quot;;</div><div class="line">		else</div><div class="line">		&#123;</div><div class="line">			if (arrowWeapon != NULL) s += arrowWeapon-&gt;getPrint();</div><div class="line">			if (bombWeapon != NULL)</div><div class="line">			&#123;</div><div class="line">				if (s[s.size() - 1] != &apos; &apos;) s += &apos;,&apos;;</div><div class="line">				s += bombWeapon-&gt;getPrint();</div><div class="line">			&#125;</div><div class="line">			if (swordWeapon != NULL)</div><div class="line">			&#123;</div><div class="line">				if (s[s.size() - 1] != &apos; &apos;) s += &apos;,&apos;;</div><div class="line">				s += swordWeapon-&gt;getPrint();</div><div class="line">			&#125;</div><div class="line">		&#125;</div><div class="line">		puts(s.c_str());</div><div class="line">	&#125;</div><div class="line">&#125;;</div><div class="line">vector&lt;Soldier *&gt; mAllSoldier;//全部武士集合</div><div class="line"></div><div class="line">class Base</div><div class="line">&#123;</div><div class="line">public:</div><div class="line">	int Blood;</div><div class="line">	int BloodWin;</div><div class="line">	int SoidierNum;//从1开始编号</div><div class="line">	vector&lt;Soldier*&gt; mSoldier;//武士集合</div><div class="line">	int occupied;//0 no,1 </div><div class="line">	void init()//初始化大本营</div><div class="line">	&#123;</div><div class="line">		Blood = M;</div><div class="line">		SoidierNum = 0;</div><div class="line">		/*for (int i = 0; i &lt;= mSoldier.size(); i++)</div><div class="line">		&#123;</div><div class="line">		delete mSoldier[i];</div><div class="line">		&#125;*/</div><div class="line">		mSoldier.clear();</div><div class="line">		//mSoldier.push_back(NULL);</div><div class="line">		occupied = 0;</div><div class="line">	&#125;</div><div class="line">	void tackBloodWin()</div><div class="line">	&#123;</div><div class="line">		Blood += BloodWin;</div><div class="line">		BloodWin = 0;</div><div class="line">	&#125;</div><div class="line">	virtual int creatwho(int t) = 0;</div><div class="line">	virtual int getCamp() = 0;</div><div class="line">	virtual string getCampName() = 0;</div><div class="line">	Soldier* CreatSoldier();//返回指向soldier的指针，创建失败的时候的返回null</div><div class="line">&#125;;</div><div class="line"></div><div class="line"></div><div class="line">class RedBase :public Base</div><div class="line">&#123;</div><div class="line">public:</div><div class="line">	int creatwho(int t)</div><div class="line">	&#123;</div><div class="line">		return t % 5;</div><div class="line">	&#125;</div><div class="line">	int getCamp()</div><div class="line">	&#123;</div><div class="line">		return 0;</div><div class="line">	&#125;</div><div class="line">	string getCampName()</div><div class="line">	&#123;</div><div class="line">		return &quot;red&quot;;</div><div class="line">	&#125;</div><div class="line">&#125;;</div><div class="line">RedBase *RedBaseInstance;//红魔军实例</div><div class="line">class BlueBase:public Base</div><div class="line">&#123;</div><div class="line">public:</div><div class="line">	int creatwho(int t)</div><div class="line">	&#123;</div><div class="line">		int k = t % 5;</div><div class="line">		switch (k)</div><div class="line">		&#123;</div><div class="line">		case 0:</div><div class="line">			return 1;</div><div class="line">		case 1:</div><div class="line">			return 4;</div><div class="line">		case 2:</div><div class="line">			return 3;</div><div class="line">		case 3:</div><div class="line">			return 0;</div><div class="line">		case 4:</div><div class="line">			return 2;</div><div class="line">		&#125;</div><div class="line">	&#125;</div><div class="line">	int getCamp()</div><div class="line">	&#123;</div><div class="line">		return 1;</div><div class="line">	&#125;</div><div class="line">	string getCampName()</div><div class="line">	&#123;</div><div class="line">		return &quot;blue&quot;;</div><div class="line">	&#125;</div><div class="line">&#125;;</div><div class="line">BlueBase *BlueBaseInstance;//蓝魔军实例</div><div class="line">class City</div><div class="line">&#123;</div><div class="line">private:</div><div class="line">	</div><div class="line">public:</div><div class="line">	int Id;</div><div class="line">	Soldier* RedSoldier;</div><div class="line">	Soldier* BlueSoldier;</div><div class="line">	int Blood;</div><div class="line">	int whoLastWin;//0 no 1 red 2 blue</div><div class="line">	int Flag;//as up</div><div class="line">	int FlagRaise;</div><div class="line">	int lastPrintFlag;</div><div class="line">	int whoFirst;//who first to attack,0 red,1 blue</div><div class="line">	int redReward, blueReward;</div><div class="line">	queue&lt;string&gt; output;</div><div class="line">	City(int t)</div><div class="line">	&#123;</div><div class="line">		lastPrintFlag = 0;</div><div class="line">		Id = t;</div><div class="line">		Blood = 0;</div><div class="line">		whoLastWin = 0;</div><div class="line">		Flag = 0;</div><div class="line">		redReward = 0; </div><div class="line">		blueReward = 0;</div><div class="line">		FlagRaise = 0;</div><div class="line">		RedSoldier = NULL;</div><div class="line">		BlueSoldier = NULL;</div><div class="line">		while (!output.empty()) output.pop();</div><div class="line">	&#125;</div><div class="line">	void addBlood()</div><div class="line">	&#123;</div><div class="line">		Blood += 10;</div><div class="line">	&#125;</div><div class="line">	int takeBlood(int who)//拿走所有的生命元</div><div class="line">	&#123;</div><div class="line">		int t = Blood;</div><div class="line">		Blood = 0;</div><div class="line">		string s = printNowTime();</div><div class="line">		if (who == 0)</div><div class="line">		&#123;</div><div class="line">			s += RedSoldier-&gt;getPrint();</div><div class="line">		&#125;</div><div class="line">		if (who == 1)</div><div class="line">		&#123;</div><div class="line">			s += BlueSoldier-&gt;getPrint();</div><div class="line">		&#125;</div><div class="line">		s += &quot; earned &quot; +toString(t)+ &quot; elements for his headquarter&quot;;</div><div class="line">		puts(s.c_str());</div><div class="line">		return t;</div><div class="line">	&#125;</div><div class="line">	int takeWinBlood(int c, int who)</div><div class="line">	&#123;</div><div class="line">		int t = Blood;</div><div class="line">		Blood = 0;</div><div class="line">		string s = printNowTime();</div><div class="line">		if (who == 0)</div><div class="line">		&#123;</div><div class="line">			s += RedSoldier-&gt;getPrint();</div><div class="line">		&#125;</div><div class="line">		if (who == 1)</div><div class="line">		&#123;</div><div class="line">			s += BlueSoldier-&gt;getPrint();</div><div class="line">		&#125;</div><div class="line">		s += &quot; earned &quot; + toString(t) + &quot; elements for his headquarter&quot;;</div><div class="line">		//puts(s.c_str());</div><div class="line">		output.push(s);</div><div class="line">		return t;</div><div class="line">	&#125;</div><div class="line">	void printFlag(int p)</div><div class="line">	&#123;</div><div class="line">		string s=printNowTime();</div><div class="line">		if (Flag == 1)</div><div class="line">		&#123;</div><div class="line">			s += &quot;red flag raised in city &quot; + toString(p);</div><div class="line">		&#125;</div><div class="line">		else</div><div class="line">		&#123;</div><div class="line">			s += &quot;blue flag raised in city &quot; + toString(p);</div><div class="line">		&#125;</div><div class="line">		puts(s.c_str());</div><div class="line">	&#125;</div><div class="line">	void changeFlag(int p,int t)//t 1 red win ,t 2 blue win</div><div class="line">	&#123;</div><div class="line">		//if (Flag == t) return;</div><div class="line">		if (t == 1)</div><div class="line">		&#123;</div><div class="line">			if (whoLastWin == 1)</div><div class="line">			&#123;</div><div class="line">				Flag = 1;</div><div class="line">				FlagRaise = 1;</div><div class="line">				//printFlag(p);</div><div class="line">				whoFirst = 0;</div><div class="line">			&#125;</div><div class="line">			else</div><div class="line">			&#123;</div><div class="line">				whoLastWin = 1;</div><div class="line">			&#125;</div><div class="line">		&#125;</div><div class="line">		else</div><div class="line">		&#123;</div><div class="line">			if (whoLastWin == 2)</div><div class="line">			&#123;</div><div class="line">				Flag = 2;</div><div class="line">				FlagRaise = 2;</div><div class="line">				//printFlag(p);</div><div class="line">				whoFirst = 1;</div><div class="line">			&#125;</div><div class="line">			else</div><div class="line">			&#123;</div><div class="line">				whoLastWin = 2;</div><div class="line">			&#125;</div><div class="line">		&#125;</div><div class="line">	&#125;</div><div class="line"></div><div class="line">&#125;;</div><div class="line">vector &lt;City*&gt; mAllCity;</div><div class="line"></div><div class="line">void Init()//游戏初始化</div><div class="line">&#123;</div><div class="line">	cin &gt;&gt; M &gt;&gt; N &gt;&gt; R &gt;&gt; K &gt;&gt; T;</div><div class="line">	cin &gt;&gt; SoldierBlood[0] &gt;&gt; SoldierBlood[1] &gt;&gt; SoldierBlood[2] &gt;&gt; SoldierBlood[3] &gt;&gt; SoldierBlood[4];</div><div class="line">	cin &gt;&gt; SoldierAd[0] &gt;&gt; SoldierAd[1] &gt;&gt; SoldierAd[2] &gt;&gt; SoldierAd[3] &gt;&gt; SoldierAd[4];</div><div class="line"></div><div class="line">	N++;//使得编号N为bluebase</div><div class="line"></div><div class="line">	for (int i = 0; i &lt; mAllSoldier.size(); i++)</div><div class="line">	&#123;</div><div class="line">		delete mAllSoldier[i];</div><div class="line">	&#125;</div><div class="line">	mAllSoldier.clear();</div><div class="line">	//mAllSoldier.push_back(NULL);//放入一个空指针占位</div><div class="line"></div><div class="line">	RedBaseInstance = new RedBase();</div><div class="line">	RedBaseInstance-&gt;init();</div><div class="line">	BlueBaseInstance = new BlueBase();</div><div class="line">	BlueBaseInstance-&gt;init();</div><div class="line"></div><div class="line">	for (int i = 0; i &lt; mAllCity.size(); i++)</div><div class="line">	&#123;</div><div class="line">		delete mAllCity[i];</div><div class="line">	&#125;</div><div class="line">	mAllCity.clear();</div><div class="line">	for (int i = 0; i &lt;= N; i++)//0号city为redbase，N号为bluebase</div><div class="line">	&#123;</div><div class="line">		</div><div class="line">		mAllCity.push_back(new City(i));</div><div class="line">		mAllCity[i]-&gt;whoFirst = (i+1) % 2;</div><div class="line">	&#125;</div><div class="line">&#125;</div><div class="line"></div><div class="line">string printTime()</div><div class="line">&#123;</div><div class="line">	int t = CurrentTime;</div><div class="line">	int h = t / 60;</div><div class="line">	int m = t % 60;</div><div class="line">	string s;</div><div class="line">	s += h / 100 + &apos;0&apos;;</div><div class="line">	s += (h / 10) % 10 + &apos;0&apos;;</div><div class="line">	s += h % 10 + &apos;0&apos;;</div><div class="line">	s += &apos;:&apos;;</div><div class="line">	s += m / 10 + &apos;0&apos;;</div><div class="line">	s += m % 10 + &apos;0&apos;;</div><div class="line">	return s;</div><div class="line">&#125;</div><div class="line"></div><div class="line">void printBorn(string s, Soldier* p)</div><div class="line">&#123;</div><div class="line">	if (p == NULL) return;//表示没有创建</div><div class="line">	s += &apos; &apos; + p-&gt;getPrint() + &quot; born&quot;;</div><div class="line">	puts(s.c_str());</div><div class="line">	if (p-&gt;getType() == 0)//is dragon</div><div class="line">	&#123;</div><div class="line">		double t = ((Dragon*)(p))-&gt;getMorale();</div><div class="line">		//t = (double)((int)(t * 100 + 0.5)) / 100.0;//四舍五入</div><div class="line">		//oj上的测试数据并没有四舍五入。。。直接截尾取得两位有效数字，坑啊</div><div class="line">		printf(&quot;Its morale is %.2lf\n&quot;, t);</div><div class="line">	&#125;</div><div class="line">	if (p-&gt;getType() == 3)//is lion</div><div class="line">	&#123;</div><div class="line">		printf(&quot;Its loyalty is %d\n&quot;, ((Lion*)(p))-&gt;getLoyalty());</div><div class="line">	&#125;</div><div class="line">&#125;</div><div class="line">void printLionRun(string s, Lion* p)//判断lion是否逃跑以及相应信息的输出</div><div class="line">&#123;</div><div class="line">	p-&gt;runAway();</div><div class="line">	s += &quot; lion &quot; + toString(p-&gt;getId()) + &quot; ran away&quot;;</div><div class="line">	puts(s.c_str());</div><div class="line">&#125;</div><div class="line">int printMove(int c)</div><div class="line">&#123;</div><div class="line">	Soldier *p = NULL;</div><div class="line">	string s;</div><div class="line">	int f = 0;</div><div class="line"></div><div class="line">	p = mAllCity[c]-&gt;RedSoldier;//red</div><div class="line">	if (p)</div><div class="line">	&#123;</div><div class="line">		s = printNowTime() + p-&gt;getPrint();</div><div class="line">		if (c == 0) </div><div class="line">			s += &quot; reached red headquarter&quot;;</div><div class="line">		else if (c == N) s += &quot; reached blue headquarter&quot;;</div><div class="line">		else s += &quot; marched to city &quot; + toString(c);</div><div class="line">		s += &quot; with &quot; + toString(p-&gt;getBlood()) + &quot; elements and force &quot; + toString(p-&gt;getAttack());</div><div class="line">		puts(s.c_str());</div><div class="line"></div><div class="line">		if (BlueBaseInstance-&gt;occupied==2&amp;&amp;c == N)</div><div class="line">		&#123;</div><div class="line">			f = 1;</div><div class="line">			printf(&quot;%sblue headquarter was taken\n&quot;, printNowTime().c_str());</div><div class="line">		&#125;</div><div class="line">	&#125;</div><div class="line">	</div><div class="line">	</div><div class="line">	p = mAllCity[c]-&gt;BlueSoldier;//blue</div><div class="line">	if (p)</div><div class="line">	&#123;</div><div class="line">		s = printNowTime() + p-&gt;getPrint();</div><div class="line">		if (c == 0) </div><div class="line">			s += &quot; reached red headquarter&quot;;</div><div class="line">		else if (c == N) s += &quot; reached blue headquarter&quot;;</div><div class="line">		else s += &quot; marched to city &quot; + toString(c);</div><div class="line">		s += &quot; with &quot; + toString(p-&gt;getBlood()) + &quot; elements and force &quot; + toString(p-&gt;getAttack());</div><div class="line">		puts(s.c_str());</div><div class="line"></div><div class="line">		if (RedBaseInstance-&gt;occupied==2&amp;&amp;c == 0)</div><div class="line">		&#123;</div><div class="line">			f = 1;</div><div class="line">			printf(&quot;%sred headquarter was taken\n&quot;, printNowTime().c_str());</div><div class="line">		&#125;</div><div class="line">	&#125;</div><div class="line"></div><div class="line">	return f;</div><div class="line">&#125;</div><div class="line">int checkBomb(Soldier *p,Soldier *q,int t)//返回1即使需要使用bomb</div><div class="line">&#123;</div><div class="line">	//t 谁先攻击，这个应该在city中处理，0 red 1 blue</div><div class="line">	if (q-&gt;getBlood() - q-&gt;tArrow &lt;= 0) return 0;</div><div class="line">	if (p-&gt;getBlood() - p-&gt;tArrow &lt;= 0) return 0;</div><div class="line">	int a = 0, b = 0,c = 0,d = 0;</div><div class="line">	if (t == 0)//p 先攻击</div><div class="line">	&#123;</div><div class="line">		a = p-&gt;fight();</div><div class="line">		b = q-&gt;getBlood() - q-&gt;tArrow;</div><div class="line">		</div><div class="line">		if (a &lt; b)//q 没死 反击</div><div class="line">		&#123;</div><div class="line">			c = q-&gt;fightback();</div><div class="line">			d = p-&gt;getBlood() - p-&gt;tArrow;</div><div class="line">			if (c &gt;= d) return 1;</div><div class="line">		&#125;</div><div class="line">	&#125;</div><div class="line">	else//q 先攻击</div><div class="line">	&#123;</div><div class="line">		a = q-&gt;fight();</div><div class="line">		b = p-&gt;getBlood() - p-&gt;tArrow;</div><div class="line">		</div><div class="line">		if (a &gt;= b) return 1;//q 打死了 p就返回1</div><div class="line">	&#125;</div><div class="line">	return 0;</div><div class="line">&#125;</div><div class="line">int checkBomb2(Soldier *p, Soldier *q, int t)</div><div class="line">&#123;</div><div class="line">	//t 谁先攻击，这个应该在city中处理，0 red 1 blue</div><div class="line">	if (q-&gt;getBlood() - q-&gt;tArrow &lt;= 0) return 0;</div><div class="line">	if (p-&gt;getBlood() - p-&gt;tArrow &lt;= 0) return 0;</div><div class="line">	int a = 0, b = 0, c = 0, d = 0;</div><div class="line">	if (t == 0)</div><div class="line">	&#123;</div><div class="line">		a = p-&gt;fight();</div><div class="line">		b = q-&gt;getBlood() - q-&gt;tArrow;</div><div class="line">		if (a &gt;= b) return 1;</div><div class="line">	&#125;</div><div class="line">	else</div><div class="line">	&#123;</div><div class="line">		c = q-&gt;fight();</div><div class="line">		d = p-&gt;getBlood() - p-&gt;tArrow;</div><div class="line">		if (c &lt; d)</div><div class="line">		&#123;</div><div class="line">			a = p-&gt;fightback();</div><div class="line">			b = q-&gt;getBlood() - q-&gt;tArrow;</div><div class="line">			if (a &gt;= b) return 1;</div><div class="line">		&#125;</div><div class="line">	&#125;</div><div class="line">	return 0;</div><div class="line">&#125;</div><div class="line">int checkArrow(Soldier* p)//结算arrow的伤害并检查是否被射死了,返回1是被射死了</div><div class="line">&#123;</div><div class="line">	if (!p) return -1;</div><div class="line">	p-&gt;loseBlood(p-&gt;tArrow);</div><div class="line">	p-&gt;tArrow = 0;</div><div class="line">	if (p-&gt;getBlood() &lt;= 0)</div><div class="line">	&#123;</div><div class="line">		p-&gt;dieByArrow = 1;</div><div class="line">		p-&gt;die();</div><div class="line">		return 1;</div><div class="line">	&#125;</div><div class="line">	return 0;</div><div class="line">&#125;</div><div class="line">int printFight(int i,Soldier *p,Soldier *q)//返回0，就是q死了</div><div class="line">&#123;</div><div class="line">	int a = p-&gt;fight();</div><div class="line">	int b = q-&gt;getBlood();</div><div class="line">	p-&gt;loseWeapon(0);//武器损耗</div><div class="line">	q-&gt;loseBlood(a);</div><div class="line">	string s = printTime();</div><div class="line">	string sp, sq;</div><div class="line">	if (p-&gt;getCamp() == 0) sp = &quot; red &quot;;</div><div class="line">		else sp = &quot; blue &quot;;</div><div class="line">	if (q-&gt;getCamp() == 0) sq = &quot; red &quot;;</div><div class="line">		else sq = &quot; blue &quot;;</div><div class="line">	s += sp + p-&gt;getName() + &apos; &apos; + toString(p-&gt;getId()) + &quot; attacked&quot; + sq;</div><div class="line">	s += q-&gt;getName() + &apos; &apos; + toString(q-&gt;getId()) + &quot; in city &quot; + toString(i);</div><div class="line">	s += &quot; with &quot; + toString(p-&gt;getBlood()) + &quot; elements and force &quot; + toString(p-&gt;getAttack());</div><div class="line">	//puts(s.c_str());</div><div class="line">	mAllCity[i]-&gt;output.push(s);</div><div class="line">	return q-&gt;isLive;</div><div class="line">&#125;</div><div class="line">int printFightBack(int i, Soldier *p, Soldier *q)</div><div class="line">&#123;</div><div class="line">	if (p-&gt;getType() == 1)//ninjia no fightback</div><div class="line">		return 1;</div><div class="line">	int a = p-&gt;fightback();</div><div class="line">	int b = q-&gt;getBlood();</div><div class="line">	p-&gt;loseWeapon(0);</div><div class="line">	q-&gt;loseBlood(a);</div><div class="line">	string s = printNowTime();</div><div class="line">	s += p-&gt;getPrint() + &quot; fought back against &quot; + q-&gt;getPrint() + &quot; in city &quot; + toString(i);</div><div class="line">	//puts(s.c_str());</div><div class="line">	mAllCity[i]-&gt;output.push(s);</div><div class="line">	return q-&gt;isLive;</div><div class="line">&#125;</div><div class="line">void printKilled(int i,Soldier *p)</div><div class="line">&#123;</div><div class="line">	string s = printTime() + &apos; &apos; + p-&gt;getCampName() + &apos; &apos;;</div><div class="line">	s += p-&gt;getName() + &apos; &apos; + toString(p-&gt;getId()) + &quot; was killed in city &quot; + toString(i);</div><div class="line">	//puts(s.c_str());</div><div class="line">	mAllCity[i]-&gt;output.push(s);</div><div class="line">&#125;</div><div class="line">void afterbattle(int i, int t)//在city i 战斗结束后的事情，0 平局 1 red win 2 blue win</div><div class="line">&#123;</div><div class="line">	if (t == 0)//平局</div><div class="line">	&#123;</div><div class="line">		mAllCity[i]-&gt;RedSoldier-&gt;drawFight(mAllCity[i]-&gt;BlueSoldier, i);</div><div class="line">		mAllCity[i]-&gt;BlueSoldier-&gt;drawFight(mAllCity[i]-&gt;RedSoldier, i);</div><div class="line">		mAllCity[i]-&gt;whoLastWin = 0;</div><div class="line">	&#125;</div><div class="line">	if (t == 1)//red win</div><div class="line">	&#123;</div><div class="line">		</div><div class="line">		mAllCity[i]-&gt;RedSoldier-&gt;winFight(mAllCity[i]-&gt;BlueSoldier, i);</div><div class="line">		mAllCity[i]-&gt;BlueSoldier-&gt;loseFight(mAllCity[i]-&gt;RedSoldier, i);</div><div class="line">		RedBaseInstance-&gt;BloodWin += mAllCity[i]-&gt;takeWinBlood(i, 0);</div><div class="line">		mAllCity[i]-&gt;changeFlag(i,1);</div><div class="line">	&#125;</div><div class="line">	if (t == 2)//blue win</div><div class="line">	&#123;</div><div class="line">		</div><div class="line">		mAllCity[i]-&gt;RedSoldier-&gt;loseFight(mAllCity[i]-&gt;BlueSoldier, i);</div><div class="line">		mAllCity[i]-&gt;BlueSoldier-&gt;winFight(mAllCity[i]-&gt;RedSoldier, i);</div><div class="line">		BlueBaseInstance-&gt;BloodWin += mAllCity[i]-&gt;takeWinBlood(i, 1);</div><div class="line">		mAllCity[i]-&gt;changeFlag(i,2);</div><div class="line">	&#125;</div><div class="line">&#125;</div><div class="line">void redReward()</div><div class="line">&#123;</div><div class="line">	for (int i = N - 1; i &gt; 0; i--)//red reward</div><div class="line">	&#123;</div><div class="line">		if (!mAllCity[i]-&gt;RedSoldier) continue;</div><div class="line">		while (mAllCity[i]-&gt;RedSoldier-&gt;BloodWin&gt;0)</div><div class="line">			if (RedBaseInstance-&gt;Blood &gt;= 8)</div><div class="line">			&#123;</div><div class="line">				RedBaseInstance-&gt;Blood -= 8;</div><div class="line">				mAllCity[i]-&gt;RedSoldier-&gt;Blood += 8;</div><div class="line">				mAllCity[i]-&gt;RedSoldier-&gt;BloodWin -= 8;</div><div class="line">				mAllCity[i]-&gt;redReward = 1;</div><div class="line">			&#125;</div><div class="line">		//mAllCity[i]-&gt;RedSoldier-&gt;BloodWin = 0;</div><div class="line">	&#125;</div><div class="line">&#125;</div><div class="line">void blueReward()</div><div class="line">&#123;</div><div class="line">	for (int i = 1; i &lt; N; i++)//blue reward</div><div class="line">	&#123;</div><div class="line">		if (!mAllCity[i]-&gt;BlueSoldier) continue;</div><div class="line">		while (mAllCity[i]-&gt;BlueSoldier-&gt;BloodWin&gt;0)</div><div class="line">			if (BlueBaseInstance-&gt;Blood &gt;= 8)</div><div class="line">			&#123;</div><div class="line">				BlueBaseInstance-&gt;Blood -= 8;</div><div class="line">				mAllCity[i]-&gt;BlueSoldier-&gt;Blood += 8;</div><div class="line">				mAllCity[i]-&gt;BlueSoldier-&gt;BloodWin -= 8;</div><div class="line">				mAllCity[i]-&gt;blueReward = 1;</div><div class="line">			&#125;</div><div class="line">		//mAllCity[i]-&gt;BlueSoldier-&gt;BloodWin = 0;</div><div class="line">	&#125;</div><div class="line">&#125;</div><div class="line"></div><div class="line"></div><div class="line">void Game()//游戏进程</div><div class="line">&#123;</div><div class="line">	CurrentTime = -1;</div><div class="line">	Soldier *RedOccSoldier = NULL;</div><div class="line">	Soldier *BlueOccSoldier = NULL;</div><div class="line">	while (CurrentTime &lt;= T)</div><div class="line">	&#123;</div><div class="line">		CurrentTime++;</div><div class="line">		if (CurrentTime &gt; T) return;</div><div class="line">		int CurrentMinute = CurrentTime % 60;</div><div class="line">		string st = printTime();</div><div class="line">		switch (CurrentMinute)</div><div class="line">		&#123;</div><div class="line">			case 0:</div><div class="line">			&#123;</div><div class="line">				string s = st;</div><div class="line">				//red</div><div class="line">				Soldier* p = RedBaseInstance-&gt;CreatSoldier();</div><div class="line">				printBorn(s, p);</div><div class="line"></div><div class="line">				//blue</div><div class="line">				p = BlueBaseInstance-&gt;CreatSoldier();</div><div class="line">				printBorn(s, p);</div><div class="line"></div><div class="line">				break;</div><div class="line">			&#125;</div><div class="line">			case 5:</div><div class="line">			&#123;</div><div class="line">				for (int i = 0; i &lt;= N; i++)//从西向东</div><div class="line">				&#123;</div><div class="line">					//red</div><div class="line">					if (mAllCity[i]-&gt;RedSoldier&amp;&amp;mAllCity[i]-&gt;RedSoldier-&gt;getType() == 3)//is lion</div><div class="line">						if (i != N)//not at bluebase</div><div class="line">						&#123;</div><div class="line">							Lion *p = (Lion *)mAllCity[i]-&gt;RedSoldier;</div><div class="line">							string s = st;</div><div class="line">							s += &quot; red&quot;;</div><div class="line">							if (p-&gt;getLoyalty() &lt;= 0)</div><div class="line">							&#123;</div><div class="line">								printLionRun(s, p);</div><div class="line">								mAllCity[i]-&gt;RedSoldier = NULL;</div><div class="line">							&#125;	</div><div class="line">						&#125;</div><div class="line"></div><div class="line">					//blue</div><div class="line">					if (mAllCity[i]-&gt;BlueSoldier&amp;&amp;mAllCity[i]-&gt;BlueSoldier-&gt;getType() == 3)//is lion</div><div class="line">						if (i != 0)//not at redbase</div><div class="line">						&#123;</div><div class="line">							Lion *p = (Lion *)mAllCity[i]-&gt;BlueSoldier;</div><div class="line">							string s = st;</div><div class="line">							s += &quot; blue&quot;;</div><div class="line">							if (p-&gt;getLoyalty() &lt;= 0)</div><div class="line">							&#123;</div><div class="line">								printLionRun(s, p);</div><div class="line">								mAllCity[i]-&gt;BlueSoldier = NULL;</div><div class="line">							&#125;</div><div class="line">						&#125;</div><div class="line">				&#125;</div><div class="line">				break;</div><div class="line">			&#125;</div><div class="line">			case 10:</div><div class="line">			&#123;</div><div class="line">				int f = 0;//1即为占领了</div><div class="line"></div><div class="line">				//red</div><div class="line">				for (int i = N; i &gt; 0; i--)</div><div class="line">				&#123;</div><div class="line">					if (i == N &amp;&amp; mAllCity[N]-&gt;RedSoldier) RedOccSoldier = mAllCity[N]-&gt;RedSoldier;</div><div class="line">					mAllCity[i]-&gt;RedSoldier = mAllCity[i - 1]-&gt;RedSoldier;</div><div class="line">					if (mAllCity[i]-&gt;RedSoldier&amp;&amp;mAllCity[i]-&gt;RedSoldier-&gt;getType() == 2)</div><div class="line">					&#123;</div><div class="line">						((Iceman*)mAllCity[i]-&gt;RedSoldier)-&gt;Move();</div><div class="line">					&#125;</div><div class="line">				&#125;</div><div class="line">				mAllCity[0]-&gt;RedSoldier = NULL;</div><div class="line">				if (mAllCity[N]-&gt;RedSoldier) &#123; BlueBaseInstance-&gt;occupied++; &#125;</div><div class="line">				</div><div class="line"></div><div class="line">				//blue</div><div class="line">				for (int i = 0; i &lt; N; i++)</div><div class="line">				&#123;</div><div class="line">					if (i == 0 &amp;&amp; mAllCity[0]-&gt;BlueSoldier) BlueOccSoldier = mAllCity[0]-&gt;BlueSoldier;</div><div class="line">					mAllCity[i]-&gt;BlueSoldier = mAllCity[i + 1]-&gt;BlueSoldier;</div><div class="line">					if (mAllCity[i]-&gt;BlueSoldier&amp;&amp;mAllCity[i]-&gt;BlueSoldier-&gt;getType() == 2)</div><div class="line">					&#123;</div><div class="line">						((Iceman*)mAllCity[i]-&gt;BlueSoldier)-&gt;Move();</div><div class="line">					&#125;</div><div class="line">				&#125;</div><div class="line">				mAllCity[N]-&gt;BlueSoldier = NULL;</div><div class="line">				if (mAllCity[0]-&gt;BlueSoldier) RedBaseInstance-&gt;occupied++;</div><div class="line">				for (int i = 0; i &lt;= N; i++)</div><div class="line">				&#123;</div><div class="line">					if (printMove(i)) f = 1;</div><div class="line">				&#125;</div><div class="line"></div><div class="line">				//be occupied?</div><div class="line">				if (f) return;</div><div class="line">				break;</div><div class="line">			&#125;</div><div class="line">			case 20:</div><div class="line">			&#123;</div><div class="line">				for (int i = 1; i &lt; N; i++)//不包括红蓝司令部</div><div class="line">				&#123;</div><div class="line">					mAllCity[i]-&gt;addBlood();</div><div class="line">				&#125;</div><div class="line">				/*RedBaseInstance-&gt;Blood += 10;</div><div class="line">				BlueBaseInstance-&gt;Blood += 10;*/</div><div class="line">				break;</div><div class="line">			&#125;</div><div class="line">			case 30:</div><div class="line">			&#123;</div><div class="line">				for (int i = 1; i &lt; N; i++)</div><div class="line">				&#123;</div><div class="line">					if (mAllCity[i]-&gt;RedSoldier != NULL&amp;&amp;mAllCity[i]-&gt;BlueSoldier == NULL)</div><div class="line">						RedBaseInstance-&gt;Blood += mAllCity[i]-&gt;takeBlood(0);</div><div class="line">					if (mAllCity[i]-&gt;RedSoldier == NULL&amp;&amp;mAllCity[i]-&gt;BlueSoldier != NULL)</div><div class="line">						BlueBaseInstance-&gt;Blood += mAllCity[i]-&gt;takeBlood(1);</div><div class="line">				&#125;</div><div class="line">				break;</div><div class="line">			&#125;</div><div class="line">			case 35:</div><div class="line">			&#123;</div><div class="line">				//red</div><div class="line">				for (int i = 1; i &lt; N; i++)</div><div class="line">				&#123;</div><div class="line">					Soldier *p = mAllCity[i]-&gt;RedSoldier;</div><div class="line">					//if (!p) continue;</div><div class="line">					if (i &lt; N-1)</div><div class="line">					&#123;</div><div class="line">						if (p&amp;&amp;p-&gt;hasArrow)</div><div class="line">						&#123;</div><div class="line">							Arrow *q = p-&gt;hasArrow;</div><div class="line">							if (mAllCity[i + 1]-&gt;BlueSoldier)</div><div class="line">							&#123;</div><div class="line">								mAllCity[i + 1]-&gt;BlueSoldier-&gt;tArrow += R;</div><div class="line"></div><div class="line">								if (q-&gt;lose() == 0)//返回值为0说明arrow已经消失</div><div class="line">								&#123;</div><div class="line">									//delete q;</div><div class="line">									int t = p-&gt;getType();</div><div class="line">									switch (t)</div><div class="line">									&#123;</div><div class="line">									case 0:</div><div class="line">									&#123;</div><div class="line">										((Dragon *)p)-&gt;mWeapon = NULL;</div><div class="line">										break;</div><div class="line">									&#125;</div><div class="line">									case 1:</div><div class="line">									&#123;</div><div class="line">										if (((Ninja *)p)-&gt;mWeapon1 &amp;&amp; ((Ninja *)p)-&gt;mWeapon1-&gt;getType() == 2) ((Ninja *)p)-&gt;mWeapon1 = NULL;</div><div class="line">										if (((Ninja *)p)-&gt;mWeapon2 &amp;&amp; ((Ninja *)p)-&gt;mWeapon2-&gt;getType() == 2) ((Ninja *)p)-&gt;mWeapon2 = NULL;</div><div class="line">										break;</div><div class="line">									&#125;</div><div class="line">									case 2:</div><div class="line">									&#123;</div><div class="line">										((Iceman *)p)-&gt;mWeapon = NULL;</div><div class="line">										break;</div><div class="line">									&#125;</div><div class="line">									case 4:</div><div class="line">									&#123;</div><div class="line">										((Wolf *)p)-&gt;arrowWeapon = NULL;</div><div class="line">										break;</div><div class="line">									&#125;</div><div class="line">									&#125;</div><div class="line">									p-&gt;hasArrow = NULL;</div><div class="line">								&#125;</div><div class="line">								string s = st + &quot; red &quot;;</div><div class="line">								s += mAllCity[i]-&gt;RedSoldier-&gt;getName() + &apos; &apos; + toString(mAllCity[i]-&gt;RedSoldier-&gt;getId()) + &quot; shot&quot;;</div><div class="line">								if (mAllCity[i + 1]-&gt;BlueSoldier&amp;&amp;mAllCity[i + 1]-&gt;BlueSoldier-&gt;getBlood() &lt;= R)</div><div class="line">									s += &quot; and killed blue &quot; + mAllCity[i + 1]-&gt;BlueSoldier-&gt;getName() + &apos; &apos; + toString(mAllCity[i + 1]-&gt;BlueSoldier-&gt;getId());</div><div class="line">								puts(s.c_str());</div><div class="line">							&#125;</div><div class="line">						&#125;						</div><div class="line">					&#125;</div><div class="line">					//blue</div><div class="line">					if (i &gt; 1)</div><div class="line">					&#123;</div><div class="line">						Soldier *p = mAllCity[i]-&gt;BlueSoldier;</div><div class="line">						//if (!p) continue;</div><div class="line">						if (p&amp;&amp;p-&gt;hasArrow)</div><div class="line">						&#123;</div><div class="line">							Arrow *q = p-&gt;hasArrow;</div><div class="line">							if (mAllCity[i - 1]-&gt;RedSoldier)</div><div class="line">							&#123;</div><div class="line">								mAllCity[i - 1]-&gt;RedSoldier-&gt;tArrow += R;</div><div class="line">								if (q-&gt;lose() == 0)//返回值为0说明arrow已经消失</div><div class="line">								&#123;</div><div class="line">									//delete q;</div><div class="line">									int t = p-&gt;getType();</div><div class="line">									switch (t)</div><div class="line">									&#123;</div><div class="line">									case 0:</div><div class="line">									&#123;</div><div class="line">										((Dragon *)p)-&gt;mWeapon = NULL;</div><div class="line">										break;</div><div class="line">									&#125;</div><div class="line">									case 1:</div><div class="line">									&#123;</div><div class="line">										if (((Ninja *)p)-&gt;mWeapon1 &amp;&amp; ((Ninja *)p)-&gt;mWeapon1-&gt;getType() == 2) ((Ninja *)p)-&gt;mWeapon1 = NULL;</div><div class="line">										if (((Ninja *)p)-&gt;mWeapon2 &amp;&amp; ((Ninja *)p)-&gt;mWeapon2-&gt;getType() == 2) ((Ninja *)p)-&gt;mWeapon2 = NULL;</div><div class="line">										break;</div><div class="line">									&#125;</div><div class="line">									case 2:</div><div class="line">									&#123;</div><div class="line">										((Iceman *)p)-&gt;mWeapon = NULL;</div><div class="line">										break;</div><div class="line">									&#125;</div><div class="line">									case 4:</div><div class="line">									&#123;</div><div class="line">										((Wolf *)p)-&gt;arrowWeapon = NULL;</div><div class="line">										break;</div><div class="line">									&#125;</div><div class="line">									&#125;</div><div class="line">									p-&gt;hasArrow = NULL;</div><div class="line">								&#125;</div><div class="line">								string s = st + &quot; blue &quot;;</div><div class="line">								s += mAllCity[i]-&gt;BlueSoldier-&gt;getName() + &apos; &apos; + toString(mAllCity[i]-&gt;BlueSoldier-&gt;getId()) + &quot; shot&quot;;</div><div class="line">								if (mAllCity[i - 1]-&gt;RedSoldier&amp;&amp;mAllCity[i - 1]-&gt;RedSoldier-&gt;getBlood() &lt;= R)</div><div class="line">									s += &quot; and killed red &quot; + mAllCity[i - 1]-&gt;RedSoldier-&gt;getName() + &apos; &apos; + toString(mAllCity[i - 1]-&gt;RedSoldier-&gt;getId());</div><div class="line">								puts(s.c_str());</div><div class="line">							&#125;</div><div class="line">						&#125;</div><div class="line">					&#125;</div><div class="line">				&#125;</div><div class="line"></div><div class="line">				break;</div><div class="line">			&#125;</div><div class="line">			case 38:</div><div class="line">			&#123;</div><div class="line"> 				for (int i = 1; i &lt; N; i++)</div><div class="line">				&#123;</div><div class="line">					string s = st;</div><div class="line">					Soldier *p = mAllCity[i]-&gt;RedSoldier;</div><div class="line">					if (p&amp;&amp;p-&gt;hasBomb)</div><div class="line">					&#123;</div><div class="line">						if (mAllCity[i]-&gt;BlueSoldier&amp;&amp;checkBomb(p,mAllCity[i]-&gt;BlueSoldier,mAllCity[i]-&gt;whoFirst))</div><div class="line">						&#123;</div><div class="line">							p-&gt;loseWeapon(1);</div><div class="line">							s = st;</div><div class="line">							s += &quot; red &quot;+p-&gt;getName()+&apos; &apos;+toString(p-&gt;getId())+&quot; used a bomb and killed blue &quot;;</div><div class="line">							s += mAllCity[i]-&gt;BlueSoldier-&gt;getName()+&apos; &apos;+toString(mAllCity[i]-&gt;BlueSoldier-&gt;getId());</div><div class="line">							puts(s.c_str());</div><div class="line">							p-&gt;die();</div><div class="line">							mAllCity[i]-&gt;BlueSoldier-&gt;die();</div><div class="line">							mAllCity[i]-&gt;RedSoldier = NULL;</div><div class="line">							mAllCity[i]-&gt;BlueSoldier = NULL;</div><div class="line">						&#125;</div><div class="line">					&#125;</div><div class="line"></div><div class="line">					s = st;</div><div class="line">					p = mAllCity[i]-&gt;BlueSoldier;</div><div class="line">					if (p&amp;&amp;p-&gt;hasBomb)</div><div class="line">					&#123;</div><div class="line">						if (mAllCity[i]-&gt;RedSoldier&amp;&amp;checkBomb2(mAllCity[i]-&gt;RedSoldier,p, mAllCity[i]-&gt;whoFirst))</div><div class="line">						&#123;</div><div class="line">							p-&gt;loseWeapon(1);</div><div class="line">							s = st;</div><div class="line">							s += &quot; blue &quot; + p-&gt;getName() + &apos; &apos; + toString(p-&gt;getId()) + &quot; used a bomb and killed red &quot;;</div><div class="line">							s += mAllCity[i]-&gt;RedSoldier-&gt;getName() + &apos; &apos; + toString(mAllCity[i]-&gt;RedSoldier-&gt;getId());</div><div class="line">							puts(s.c_str());</div><div class="line">							p-&gt;die();</div><div class="line">							mAllCity[i]-&gt;RedSoldier-&gt;die();</div><div class="line">							mAllCity[i]-&gt;RedSoldier = NULL;</div><div class="line">							mAllCity[i]-&gt;BlueSoldier = NULL;</div><div class="line">						&#125;</div><div class="line">					&#125;</div><div class="line"></div><div class="line">				&#125;</div><div class="line">				break;</div><div class="line">			&#125;</div><div class="line">			case 40:</div><div class="line">			&#123;</div><div class="line">				for (int i = 1; i &lt; N; i++)//记录lion战斗前的blood</div><div class="line">				&#123;</div><div class="line">					if (mAllCity[i]-&gt;RedSoldier&amp;&amp;mAllCity[i]-&gt;RedSoldier-&gt;getType() == 3)</div><div class="line">						((Lion *)mAllCity[i]-&gt;RedSoldier)-&gt;moveBlood();</div><div class="line">					if (mAllCity[i]-&gt;BlueSoldier&amp;&amp;mAllCity[i]-&gt;BlueSoldier-&gt;getType() == 3)</div><div class="line">						((Lion *)mAllCity[i]-&gt;BlueSoldier)-&gt;moveBlood();</div><div class="line">				&#125;</div><div class="line">				for (int i = 1; i &lt; N; i++)</div><div class="line">				&#123;</div><div class="line">					//先处理arrow事件</div><div class="line">					int r = checkArrow(mAllCity[i]-&gt;RedSoldier);</div><div class="line">					int b = checkArrow(mAllCity[i]-&gt;BlueSoldier);</div><div class="line">					if (r == -1 || b == -1)</div><div class="line">					&#123;</div><div class="line">						if (r==1) mAllCity[i]-&gt;RedSoldier = NULL;</div><div class="line">						if (b==1) mAllCity[i]-&gt;BlueSoldier = NULL;</div><div class="line">						continue;//no fight</div><div class="line">					&#125;</div><div class="line">					if (r == 1 &amp;&amp; b == 1) &#123; mAllCity[i]-&gt;RedSoldier = NULL; mAllCity[i]-&gt;BlueSoldier = NULL; &#125;//all die,no fight</div><div class="line">					if (r == 0 &amp;&amp; b == 1) &#123; afterbattle(i, 1); mAllCity[i]-&gt;BlueSoldier = NULL; redReward(); &#125;//blue die,red win</div><div class="line">					if (r == 1 &amp;&amp; b == 0) &#123; afterbattle(i, 2); mAllCity[i]-&gt;RedSoldier = NULL; blueReward(); &#125;//blue win</div><div class="line"></div><div class="line">					if (r == 0 &amp;&amp; b == 0)//all not die,begin to fight</div><div class="line">					&#123;</div><div class="line">						int t = mAllCity[i]-&gt;whoFirst;</div><div class="line">						if (t == 0)//red attack,blue fightback</div><div class="line">						&#123;</div><div class="line">							int tmp = printFight(i, mAllCity[i]-&gt;RedSoldier, mAllCity[i]-&gt;BlueSoldier);</div><div class="line">							if (tmp)//没杀死，等待反击</div><div class="line">							&#123;</div><div class="line">								int tmp2=printFightBack(i, mAllCity[i]-&gt;BlueSoldier, mAllCity[i]-&gt;RedSoldier);</div><div class="line">								if (tmp2)//反击没死，平局</div><div class="line">								&#123;</div><div class="line">									afterbattle(i, 0);</div><div class="line">								&#125;</div><div class="line">								else// blue win</div><div class="line">								&#123;</div><div class="line">									printKilled(i, mAllCity[i]-&gt;RedSoldier);</div><div class="line">									afterbattle(i, 2);</div><div class="line">									mAllCity[i]-&gt;RedSoldier = NULL;</div><div class="line">								&#125;</div><div class="line">							&#125;</div><div class="line">							else//杀死了，red win</div><div class="line">							&#123;</div><div class="line">								printKilled(i, mAllCity[i]-&gt;BlueSoldier);</div><div class="line">								afterbattle(i, 1);</div><div class="line">								mAllCity[i]-&gt;BlueSoldier = NULL;</div><div class="line">							&#125;</div><div class="line">						&#125;</div><div class="line">						else</div><div class="line">						&#123;</div><div class="line">							int tmp = printFight(i, mAllCity[i]-&gt;BlueSoldier, mAllCity[i]-&gt;RedSoldier);</div><div class="line">							if (tmp)//没杀死，等待反击</div><div class="line">							&#123;</div><div class="line">								int tmp2 = printFightBack(i, mAllCity[i]-&gt;RedSoldier, mAllCity[i]-&gt;BlueSoldier);</div><div class="line">								if (tmp2)//反击没死，平局</div><div class="line">								&#123;</div><div class="line">									afterbattle(i, 0);</div><div class="line">								&#125;</div><div class="line">								else// red win</div><div class="line">								&#123;</div><div class="line">									printKilled(i, mAllCity[i]-&gt;BlueSoldier);</div><div class="line">									afterbattle(i, 1);</div><div class="line">									mAllCity[i]-&gt;BlueSoldier = NULL;</div><div class="line">								&#125;</div><div class="line">							&#125;</div><div class="line">							else//杀死了，blue win</div><div class="line">							&#123;</div><div class="line">								printKilled(i, mAllCity[i]-&gt;RedSoldier);</div><div class="line">								afterbattle(i, 2);</div><div class="line">								mAllCity[i]-&gt;RedSoldier = NULL;</div><div class="line">							&#125;</div><div class="line">						&#125;</div><div class="line">					&#125;</div><div class="line">				&#125;</div><div class="line">				redReward();</div><div class="line">				blueReward();</div><div class="line">				RedBaseInstance-&gt;tackBloodWin();</div><div class="line">				BlueBaseInstance-&gt;tackBloodWin();</div><div class="line">				for (int i = 1; i &lt; N; i++)//output</div><div class="line">				&#123;</div><div class="line">					while (!mAllCity[i]-&gt;output.empty())</div><div class="line">					&#123;</div><div class="line">						puts(mAllCity[i]-&gt;output.front().c_str());</div><div class="line">						mAllCity[i]-&gt;output.pop();</div><div class="line">					&#125;</div><div class="line">					/*if (mAllCity[i]-&gt;redReward)</div><div class="line">					&#123;</div><div class="line">						mAllCity[i]-&gt;redReward = 0;</div><div class="line">						string s = printNowTime() + mAllCity[i]-&gt;RedSoldier-&gt;getPrint() + &quot; earned 8 elements for his headquarter&quot;;</div><div class="line">						puts(s.c_str());</div><div class="line">					&#125;</div><div class="line">					if (mAllCity[i]-&gt;blueReward)</div><div class="line">					&#123;</div><div class="line">						mAllCity[i]-&gt;blueReward = 0;</div><div class="line">						string s = printNowTime() + mAllCity[i]-&gt;BlueSoldier-&gt;getPrint() + &quot; earned 8 elements for his headquarter&quot;;</div><div class="line">						puts(s.c_str());</div><div class="line">					&#125;*/</div><div class="line">					if (mAllCity[i]-&gt;FlagRaise == 1&amp;&amp; mAllCity[i]-&gt;lastPrintFlag!=1)</div><div class="line">					&#123;</div><div class="line">						mAllCity[i]-&gt;FlagRaise = 0;</div><div class="line">						mAllCity[i]-&gt;lastPrintFlag = 1;</div><div class="line">						string s = printNowTime() + &quot;red flag raised in city &quot; + toString(i);</div><div class="line">						puts(s.c_str());</div><div class="line">					&#125;</div><div class="line">					if (mAllCity[i]-&gt;FlagRaise == 2&amp;&amp; mAllCity[i]-&gt;lastPrintFlag!=2)</div><div class="line">					&#123;</div><div class="line">						mAllCity[i]-&gt;FlagRaise = 0;</div><div class="line">						mAllCity[i]-&gt;lastPrintFlag = 2;</div><div class="line">						string s = printNowTime() + &quot;blue flag raised in city &quot; + toString(i);</div><div class="line">						puts(s.c_str());</div><div class="line">					&#125;</div><div class="line">				&#125;</div><div class="line">				break;</div><div class="line">			&#125;</div><div class="line">			case 50:</div><div class="line">			&#123;</div><div class="line">				string s = printNowTime() + toString(RedBaseInstance-&gt;Blood) + &quot; elements in red headquarter&quot;;</div><div class="line">				puts(s.c_str());</div><div class="line">				s = printNowTime() + toString(BlueBaseInstance-&gt;Blood) + &quot; elements in blue headquarter&quot;;</div><div class="line">				puts(s.c_str());</div><div class="line">				break;</div><div class="line">			&#125;</div><div class="line">			case 55:</div><div class="line">			&#123;</div><div class="line">				for (int i = 0; i &lt;= N; i++)</div><div class="line">				&#123;</div><div class="line">					if (mAllCity[i]-&gt;RedSoldier)</div><div class="line">					&#123;</div><div class="line">						mAllCity[i]-&gt;RedSoldier-&gt;printWeapon();</div><div class="line">					&#125;</div><div class="line">				&#125;</div><div class="line">				if (RedOccSoldier) RedOccSoldier-&gt;printWeapon();</div><div class="line">				if (BlueOccSoldier) BlueOccSoldier-&gt;printWeapon();</div><div class="line">				for (int i = 0; i &lt;= N; i++)</div><div class="line">				&#123;</div><div class="line">					if (mAllCity[i]-&gt;BlueSoldier)</div><div class="line">					&#123;</div><div class="line">						mAllCity[i]-&gt;BlueSoldier-&gt;printWeapon();</div><div class="line">					&#125;</div><div class="line">				&#125;</div><div class="line">				break;</div><div class="line">			&#125;</div><div class="line">		&#125;</div><div class="line">	&#125;</div><div class="line">&#125;</div><div class="line">int main()</div><div class="line">&#123;</div><div class="line">	int t;</div><div class="line">	cin &gt;&gt; t;</div><div class="line">	int c = 0;</div><div class="line">	while (t--) </div><div class="line">	&#123;</div><div class="line">		cout &lt;&lt; &quot;Case &quot; &lt;&lt; ++c &lt;&lt; &quot;:&quot; &lt;&lt; endl;</div><div class="line">		Init();</div><div class="line">		Game();</div><div class="line">	&#125;</div><div class="line">	system(&quot;pause&quot;);</div><div class="line">    return 0;</div><div class="line">&#125;</div><div class="line"></div><div class="line"></div><div class="line">void Sword::init()</div><div class="line">&#123;</div><div class="line">	//Attack = mAllSoldier[Belong]-&gt;getAttack()*0.2;</div><div class="line">&#125;</div><div class="line">void Lion::init()</div><div class="line">&#123;</div><div class="line">	if (getCamp() == 0) &#123;</div><div class="line">		Loyalty = RedBaseInstance-&gt;Blood;</div><div class="line">	&#125;</div><div class="line">	else &#123;</div><div class="line">		Loyalty = BlueBaseInstance-&gt;Blood;</div><div class="line">	&#125;</div><div class="line">&#125;</div><div class="line">void getWeapon(Soldier * t,Weapon* &amp;p, int code)</div><div class="line">&#123;</div><div class="line">	switch (code)</div><div class="line">	&#123;</div><div class="line">		case 0:</div><div class="line">		&#123;</div><div class="line">			p = new Sword();</div><div class="line">			((Sword *)p)-&gt;init();</div><div class="line">			((Sword *)p)-&gt;setAttack(t-&gt;getAttack());</div><div class="line">			if (p-&gt;getAttack() == 0)</div><div class="line">			&#123;</div><div class="line">				delete p;</div><div class="line">				p = NULL;</div><div class="line">			&#125;</div><div class="line">			break;</div><div class="line">		&#125;</div><div class="line">		case 1:</div><div class="line">		&#123;</div><div class="line">			p = new Bomb();</div><div class="line">			((Bomb *)p)-&gt;init();</div><div class="line">			t-&gt;hasBomb = ((Bomb *)p);</div><div class="line">			break;</div><div class="line">		&#125;</div><div class="line">		case 2:</div><div class="line">		&#123;</div><div class="line">			p = new Arrow();</div><div class="line">			((Arrow *)p)-&gt;init();</div><div class="line">			t-&gt;hasArrow = ((Arrow *)p);</div><div class="line">			break;</div><div class="line">		&#125;</div><div class="line">	&#125;</div><div class="line">	//p-&gt;setBelong(getuId());//设置属于谁的</div><div class="line">&#125;</div><div class="line">void Dragon::init()</div><div class="line">&#123;</div><div class="line">	getWeapon(this,mWeapon, Id % 3);</div><div class="line">	if(mWeapon) mWeapon-&gt;setBelong(getuId());//设置属于谁的</div><div class="line">	if (Camp == 0)//3.初始化morale</div><div class="line">	&#123;</div><div class="line">		Morale = (double)RedBaseInstance-&gt;Blood / (double)SoldierBlood[0];</div><div class="line">	&#125;</div><div class="line">	else</div><div class="line">	&#123;</div><div class="line">		Morale = (double)BlueBaseInstance-&gt;Blood / (double)SoldierBlood[0];</div><div class="line">	&#125;</div><div class="line">&#125;</div><div class="line">Soldier* Base::CreatSoldier()</div><div class="line">&#123;</div><div class="line">	Soldier *tmp=NULL;</div><div class="line">	switch (creatwho(SoidierNum))</div><div class="line">	&#123;</div><div class="line">	case 0://iceman</div><div class="line">		tmp = new Iceman();</div><div class="line">		break;</div><div class="line">	case 1://lion</div><div class="line">		tmp = new Lion();</div><div class="line">		break;</div><div class="line">	case 2://wolf</div><div class="line">		tmp = new Wolf();</div><div class="line">		break;</div><div class="line">	case 3://ninja</div><div class="line">		tmp = new Ninja();</div><div class="line">		break;</div><div class="line">	case 4://dragon</div><div class="line">		tmp = new Dragon();</div><div class="line">		break;</div><div class="line">	&#125;</div><div class="line">	if (tmp-&gt;getBlood() &lt;= Blood)//可以制造出生命值为 m 的武士</div><div class="line">	&#123;</div><div class="line">		Blood -= tmp-&gt;getBlood();</div><div class="line">		SoidierNum++;</div><div class="line">		tmp-&gt;setCamp(getCamp());</div><div class="line">		tmp-&gt;setId(SoidierNum);</div><div class="line">		tmp-&gt;init();</div><div class="line">		mSoldier.push_back(tmp);</div><div class="line">		mAllSoldier.push_back(tmp);</div><div class="line"></div><div class="line">		if (getCamp() == 0)</div><div class="line">		&#123;</div><div class="line">			mAllCity[0]-&gt;RedSoldier = tmp;</div><div class="line">		&#125;</div><div class="line">		else</div><div class="line">		&#123;</div><div class="line">			mAllCity[N]-&gt;BlueSoldier = tmp;</div><div class="line">		&#125;</div><div class="line">		return tmp;</div><div class="line">	&#125;</div><div class="line">	else</div><div class="line">	&#123;</div><div class="line">		delete tmp;//</div><div class="line">		return NULL;</div><div class="line">	&#125;</div><div class="line">&#125;</div><div class="line"></div><div class="line">void Dragon::yell(int t)//judge whether to yell</div><div class="line">&#123;</div><div class="line">	if (mAllCity[t]-&gt;whoFirst == Camp)//检测是否先攻击</div><div class="line">	&#123;</div><div class="line">		if (Morale &gt; 0.8)</div><div class="line">		&#123;</div><div class="line">			string s = printTime();</div><div class="line">			if (Camp == 0) s += &quot; red &quot;;</div><div class="line">			if (Camp == 1) s += &quot; blue &quot;;</div><div class="line">			s += getName() + &apos; &apos; + toString(getId())+&quot; yelled in city &quot;+toString(t);</div><div class="line">			mAllCity[t]-&gt;output.push(s);</div><div class="line">			//puts(s.c_str());</div><div class="line">		&#125;</div><div class="line">	&#125;</div><div class="line">&#125;</div></pre></td></tr></table></figure></p>

      
    </div>
    
  </div>
  
    
    <div class="copyright">
        <p><span>本文标题:</span><a href="/2016/03/11/coursera_魔兽世界终结版/">coursera_魔兽世界终结版</a></p>
        <p><span>文章作者:</span><a href="/" title="回到主页">Bingo</a></p>
        <p><span>发布时间:</span>2016-03-11, 16:55:34</p>
        <p><span>最后更新:</span>2016-03-11, 17:20:58</p>
        <p>
            <span>原始链接:</span><a class="post-url" href="/2016/03/11/coursera_魔兽世界终结版/" title="coursera_魔兽世界终结版">http://blog.acbingo.cn/2016/03/11/coursera_魔兽世界终结版/</a>
            <span class="copy-path" data-clipboard-text="原文: http://blog.acbingo.cn/2016/03/11/coursera_魔兽世界终结版/　　作者: Bingo" title="点击复制文章链接"><i class="fa fa-clipboard"></i></span>
            <script> var clipboard = new Clipboard('.copy-path'); </script>
        </p>
        <p>
            <span>许可协议:</span><i class="fa fa-creative-commons"></i> <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/" title="CC BY-NC-SA 4.0 International" target = "_blank">"署名-非商用-相同方式共享 4.0"</a> 转载请保留原文链接及作者。
        </p>
    </div>



    <nav id="article-nav">
        
            <div id="article-nav-newer" class="article-nav-title">
                <a href="/2016/03/25/关于Inflater与findViewById()的思考/">
                    关于Inflater与findViewById()的思考
                </a>
            </div>
        
        
            <div id="article-nav-older" class="article-nav-title">
                <a href="/2016/03/05/coursera_算法作业_枚举/">
                    coursera_算法作业_枚举
                </a>
            </div>
        
    </nav>

  
</article>

    <div id="toc" class="toc-article">
        <strong class="toc-title">文章目录</strong>
        
            <ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#错误"><span class="toc-number">1.</span> <span class="toc-text">错误</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#AC代码"><span class="toc-number">2.</span> <span class="toc-text">AC代码</span></a></li></ol>
        
    </div>
    <style>
        .left-col .switch-btn,
        .left-col .switch-area {
            display: none;
        }
        .toc-level-3 i,
        .toc-level-3 ol {
            display: none !important;
        }
    </style>

    <input type="button" id="tocButton" value="隐藏目录"  title="点击按钮隐藏或者显示文章目录">

    <script>
        yiliaConfig.toc = ["隐藏目录", "显示目录", !!"false"];
    </script>



    
<div class="share">
    
        <div class="bdsharebuttonbox">
            <a href="#" class="fa fa-twitter bds_twi" data-cmd="twi" title="分享到推特"></a>
            <a href="#" class="fa fa-weibo bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
            <a href="#" class="fa fa-qq bds_sqq" data-cmd="sqq" title="分享给 QQ 好友"></a>
            <a href="#" class="fa fa-files-o bds_copy" data-cmd="copy" title="复制网址"></a>
            <a href="#" class="fa fa fa-envelope-o bds_mail" data-cmd="mail" title="通过邮件分享"></a>
            <a href="#" class="fa fa-weixin bds_weixin" data-cmd="weixin" title="生成文章二维码"></a>
            <a href="#" class="fa fa-share-alt bds_more" data-cmd="more"></i></a>
        </div>
        <script>
            window._bd_share_config={
                "common":{"bdSnsKey":{},"bdText":"coursera_魔兽世界终结版　| Bingo's Blog　","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"24"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
        </script>
    

    
</div>







    
      <div class="duoshuo" id="comments">
    <div id="comment-box" ></div>
    <div class="ds-thread" id="ds-thread" data-thread-key="2016/03/11/coursera_魔兽世界终结版/" data-title="coursera_魔兽世界终结版" data-url="http://blog.acbingo.cn/2016/03/11/coursera_魔兽世界终结版/"></div>
    <script>
        var duoshuoQuery = {short_name:"acbingo"};
        var loadComment = function(){
            var d = document, s = d.createElement('script');
            s.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
            s.async = true; s.charset = 'UTF-8';
            (d.head || d.body).appendChild(s);
        }

        
    </script>
    
    <script> loadComment(); </script>

</div>
    




    <div class="scroll" id="post-nav-button">
        
            <a href="/2016/03/25/关于Inflater与findViewById()的思考/" title="上一篇: 关于Inflater与findViewById()的思考">
                <i class="fa fa-angle-left"></i>
            </a>
        

        <a title="文章列表"><i class="fa fa-bars"></i><i class="fa fa-times"></i></a>

        
            <a href="/2016/03/05/coursera_算法作业_枚举/" title="下一篇: coursera_算法作业_枚举">
                <i class="fa fa-angle-right"></i>
            </a>
        
    </div>

    <ul class="post-list"><li class="post-list-item"><a class="post-list-link" href="/2016/08/07/c++初始化列表/">c++初始化列表</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/08/05/一步一步学习红黑树-2/">一步一步学习红黑树-2</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/08/04/一步一步学习红黑树/">一步一步学习红黑树-1</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/08/03/回文解码/">回文解码</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/08/03/C++中虚析构函数的作用/">C++中虚析构函数的作用</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/08/03/const/">const</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/08/03/const与常成员函数/">const与常成员函数</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/07/31/虚拟继承/">虚拟继承</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/07/31/函数指针/">函数指针</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/07/28/记事本/">记事本</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/07/28/StarFiles/">StarFiles</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/07/28/酒店管理系统/">酒店管理系统</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/07/28/飞机大战/">飞机大战</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/07/27/仿函数/">仿函数/函数对象</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/07/27/二叉树中和为某一值的路径/">二叉树中和为某一值的路径</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/07/26/递归实现反转列表/">递归实现反转链表</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/07/26/快速幂/">快速幂</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/07/26/bitset的用法/">bitset的用法</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/07/26/二分查找、归并排序和快速排序/">二分查找、归并排序和快速排序</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/07/25/重建二叉树/">重建二叉树</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/07/25/leetcode_5/">LeetCode_5:Longest Palindromic Substring</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/07/24/leetcode_4/">LeetCode_4:Median of Two Sorted Arrays</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/07/24/leetcode_3/">LeetCode_3:Longest Substring Without Repeating Characters</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/07/24/leetcode_2/">LeetCode_2:Add Two Numbers</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/07/24/leetcode_1_Two Sum/">LeetCode_1:Two Sum</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/06/07/Bingo's_ShadowSocks使用说明/">Bingo's_Shadowsocks</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/05/03/如何优雅的开启wifi热点/">如何优雅的开启wifi热点</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/05/02/如何优雅的连接指定wifi热点/">如何优雅的连接指定wifi热点</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/05/02/对AndroidWifi状态广播的研究/">对AndroidWifi状态广播的研究</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/05/01/coursera数据结构_字符串_课后作业/">coursera数据结构_字符串_课后作业</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/05/01/简单几步在Android_Studio上实现二维码的扫描/">简单几步在Android_Studio上实现二维码的生成与扫描</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/04/25/coursera_算法课后习题/">coursera_算法课后习题</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/04/25/coursera_计算机组成学习笔记/">coursera_计算机组成学习笔记</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/04/20/cocos2dx-飞机大战/">cocos2dx-飞机大战</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/04/14/android_ping不通电脑/">android_ping不通电脑</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/04/14/android创建与连接热点/">android创建与连接热点</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/04/01/coursera_算法_递归/">coursera_算法_递归</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/03/30/coursera_操作系统学习笔记/">coursera_操作系统学习笔记_计算机操作系统概述</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/03/29/编译原理_中科大公开课_第一单元编译器介绍作业/">编译原理_中科大公开课_第一单元编译器介绍作业</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/03/25/关于Inflater与findViewById()的思考/">关于Inflater与findViewById()的思考</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/03/11/coursera_魔兽世界终结版/">coursera_魔兽世界终结版</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/03/05/coursera_算法作业_枚举/">coursera_算法作业_枚举</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/01/27/coursera_c++高级主体和c++11新特性/">coursera_c++高级主体和c++11新特性</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/01/27/coursera_c++期末考试/">coursera_c++期末考试</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/01/24/coursera_STL2作业/">coursera_STL2作业</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/01/21/coursera容器适配器/">coursera容器适配器_算法</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/01/21/coursera标准模版库STL2/">coursera标准模版库STL2</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/01/20/coursera编程作业-STL1/">coursera编程作业-STL1</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/01/20/coursera疑问/">coursera疑问</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/01/19/coursera学习笔记-函数对象/">coursera学习笔记-函数对象</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/01/19/coursera学习笔记-顺序容器Vector/">coursera学习笔记-顺序容器Vector、List和Deque</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/12/05/算法学习笔记-14-最长公共子序列/">算法学习笔记-14-最长公共子序列</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/12/03/算法学习笔记-13-矩阵连乘问题/">算法学习笔记-13-矩阵连乘问题</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/12/01/算法学习笔记-12-循环赛日程表/">算法学习笔记-12-循环赛日程表</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/12/01/算法学习笔记-11-最接近点对问题/">算法学习笔记-11-最接近点对问题</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/12/01/算法学习笔记-10-线性时间选择/">算法学习笔记-10-线性时间选择</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/11/27/算法学习笔记-9-快速排序/">算法学习笔记-9-快速排序</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/11/26/算法学习笔记-8-合并排序/">算法学习笔记-8-归并排序</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/11/24/算法学习笔记-7-棋盘覆盖问题/">算法学习笔记-7-棋盘覆盖问题</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/11/22/算法学习笔记-6-Strassen矩阵乘法/">算法学习笔记-6-Strassen矩阵乘法</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/11/21/算法学习笔记-5-Hanoi塔问题/">算法学习笔记-5-Hanoi塔问题</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/11/20/算法学习笔记-4-整数划分问题/">算法学习笔记-4-整数划分问题</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/11/19/算法学习笔记-3-排列问题/">算法学习笔记-3-排列问题</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/11/18/算法学习笔记-2-递归的概念/">算法学习笔记-2-递归的概念</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/11/17/coursera_标准模板库STL/">coursera_标准模板库STL</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/11/17/算法学习笔记-0-序/">算法学习笔记-0-序</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/11/17/算法学习笔记-1-NP完全性理论/">算法学习笔记-1-NP完全性理论</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/11/14/文件操作和模板_编程作业/">文件操作和模板_编程作业</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/11/11/ubuntu下安装最新的nodejs(v4.2.2)/">ubuntu下安装最新的nodejs(v4.2.2)</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/11/11/ubuntu14.04的环境变量/">ubuntu14.04的环境变量</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/11/01/coursera学习笔记_文件操作和模板/">coursera学习笔记_文件操作和模板</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/10/31/coursera学习笔记_多态和虚函数/">coursera学习笔记_多态和虚函数</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/10/28/Coursera_程序设计与晋级_继承与派生_编程作业/">Coursera_程序设计与晋级_继承与派生_编程作业</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/10/22/科大OJ-数据结构-DNA序列/">科大OJ-数据结构-DNA序列</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/10/20/科大OJ-数据结构-求表达式串的后缀表达式和值/">科大OJ-数据结构-求表达式串的后缀表达式和值</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/10/01/科大OJ-数据结构-击鼓传花/">科大OJ-数据结构-击鼓传花</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/09/30/科大OJ-数据结构-求集合的交并补集/">科大OJ-数据结构-求集合的交并补集</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/09/27/hexo无法本地访问/">hexo无法本地访问</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/09/26/继承与派生/">coursera学习笔记_继承与派生</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/09/26/大数类模板/">大数类模板</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/09/15/vimium学习笔记/">vimium学习笔记</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/09/04/程序员矩阵/">程序员矩阵</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/09/03/coursera学习笔记_运算符重载/">coursera学习笔记_运算符重载</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/09/01/写hexo博客、markdown文章时图床的挑选/">写hexo博客、markdown文章时图床的挑选</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/08/31/coursera学习笔记-c++程序设计/">coursera学习笔记-c++程序设计</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/08/29/Linux下C语言应用编程学习笔记/">Linux下C语言应用编程学习笔记</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/08/28/linux学习笔记2/">linux学习笔记2</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/08/27/Bingo's exVim/">Bingo的VIM</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/08/27/linux下去掉^M的方法/">linux下去掉^M的方法</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/08/27/vim的持久撤销功能/">vim的持久撤销功能</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/08/25/linux学习笔记/">linux学习笔记</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/08/18/线段树学习笔记-7-hdu1698/">线段树学习笔记-7-hdu1698</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/08/18/线段树学习笔记-6-区间更新/">线段树学习笔记-6-区间更新</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/08/18/Coursera_程序设计与算法_C程序设计进阶/">Coursera_程序设计与算法_C程序设计进阶</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/08/18/线段树学习笔记-5-hdu2795/">线段树学习笔记-5-hdu2795</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/08/14/线段树学习笔记-4-hdu1394/">线段树学习笔记-4-hdu1394</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/08/14/求逆序对的个数/">求逆序对的个数</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/08/14/线段树学习笔记-3-hdu1754/">线段树学习笔记-3-hdu1754</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/08/13/线段树学习笔记-2-hdu1166/">线段树学习笔记-2-hdu1166</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/08/13/线段树学习笔记/">线段树学习笔记-1-入门</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/08/11/Coursera_程序设计与算法_计算导论与C语言基础_期末编程测试/">Coursera_程序设计与算法_计算导论与C语言基础_期末编程测试</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/08/10/Coursera_程序设计与算法_C程序设计进阶_C程序中的函数/">Coursera_程序设计与算法_计算导论与C语言基础_数组应用练习</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/08/10/Coursera_程序设计与算法_计算导论与C语言基础_数组应用练习/">Coursera_程序设计与算法_计算导论与C语言基础_数组应用练习</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/08/10/hdu4821 String/">hdu4821 String</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/08/09/Rolling Hash(Rabin-Karp算法)匹配字符串/">Rolling Hash(Rabin-Karp算法)匹配字符串</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/08/09/设置vim的默认工作路径/">设置vim的默认工作路径</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/08/08/滑动窗口的单调队列/">滑动窗口的单调队列</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/08/08/ssh -T git@github.com出现Permission denied (publickey)/">ssh -T git@github.com出现Permission denied (publickey)</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/05/29/UVa10791-Minimum-Sum-LCM/">UVa10791-Minimum Sum LCM</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/05/29/uva100/">uva100</a></li></ul>




    <script>
        
    </script>
</div>
      <footer id="footer">
    <div class="outer">
        <div id="footer-info">
            <div class="footer-left">
                <i class="fa fa-copyright"></i> 
                2014-2016 Bingo
            </div>
            <div class="footer-right">
                <a href="http://hexo.io/" target="_blank" title="快速、简洁且高效的博客框架">Hexo</a>  Theme <a href="https://github.com/MOxFIVE/hexo-theme-yelee" target="_blank" title="简而不减 Hexo 双栏博客主题  v3.5">Yelee</a> by MOxFIVE <i class="fa fa-heart animated infinite pulse"></i>
            </div>
        </div>
        
            <div class="visit">
                
                    <span id="busuanzi_container_site_pv" style='display:none'>
                        <span id="site-visit" title="本站到访数"><i class="fa fa-user" aria-hidden="true"></i><span id="busuanzi_value_site_uv"></span>
                        </span>
                    </span>
                
                
                    <span>| </span>
                
                
                    <span id="busuanzi_container_page_pv" style='display:none'>
                        <span id="page-visit"  title="本页阅读量"><i class="fa fa-eye animated infinite pulse" aria-hidden="true"></i><span id="busuanzi_value_page_pv"></span>
                        </span>
                    </span>
                
            </div>
        
    </div>
</footer>
    </div>
    
<script data-main="/js/main.js" src="//cdn.bootcss.com/require.js/2.2.0/require.min.js"></script>





<div class="scroll" id="scroll">
    <a href="#" title="返回顶部"><i class="fa fa-arrow-up"></i></a>
    <a href="#comments" onclick="load$hide();" title="查看评论"><i class="fa fa-comments-o"></i></a>
    <a href="#footer" title="转到底部"><i class="fa fa-arrow-down"></i></a>
</div>
<script>
    // Open in New Window
    
        var oOpenInNew = {
            
            
            
            
            
            
             archives: ".archive-article-title", 
             miniArchives: "a.post-list-link", 
            
             friends: "#js-friends a", 
             socail: ".social a" 
        }
        for (var x in oOpenInNew) {
            $(oOpenInNew[x]).attr("target", "_blank");
        }
    
</script>

<script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js">
</script>
  </div>
</body>
</html>